Last active
June 12, 2018 18:31
-
-
Save treyhoover/f152d5874f72568b56f68259afc7e6f7 to your computer and use it in GitHub Desktop.
api error responses
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
error: { | |
message: "One or more fields appear to be incorrect", // this is the main error message to show users (e.g. at the top of the form) | |
developer_message: "This is a message for developers to help diagnose the problem", // optional | |
reasons: [ | |
{ | |
param: "email", | |
message: "Please enter a valid email address", | |
}, | |
{ | |
param: "zip", | |
message: "Please enter a valid zip code", | |
} | |
] // can be an empty array | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment