Open
Description
Currently we need to write error handler like this:
render json: resource, status: :unprocessable_entity,
serializer: ActiveModel::Serializer::ErrorSerializer
It would have been much better if we could simply write like this:
render json: resource, status: :unprocessable_entity
In the latter case active_model_serializers
would need to look for errors in the resource object and if it finds any error in the object then it will implicitly invoke the error serializer unless the user has passed any serializer already.