You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Be sure to use error throwing methods everywhere, like create!, save!, find_by!, etc. The gem will rescue from any exception and respond with a properly formatted JSON body with a custom error code.
No need for rescue_from or rendering the JSON error body. Every error is rescued, logged, formatted and rendered. The client application will receive a JSON body like this:
{
"code":1010,
"message":"The parameter 'name' is missing or value is empty"
}