Ruby Build a Rails API Coding the API Better JSON Messages

Julian De Ocampo
Julian De Ocampo
2,284 Points

Where do we define what list.errors are? The errors checked for are in the model, but where are the messages defined?

I understand that the error messages would be prompted by failure to meet validation or filters within the object model, but where do we define the error codes that would be passed into this JSON object.