-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In geocoder, add support for error messages in json #21
Labels
Milestone
Comments
mraross
changed the title
In geocoder, add support for a jsonErrors flag to get error messages in json instead of html
In geocoder, add support for an errorsInJson flag to get error messages in json instead of html
Sep 21, 2017
mraross
changed the title
In geocoder, add support for an errorsInJson flag to get error messages in json instead of html
In geocoder, add support for an errorFormat flag to get error messages in json instead of html
Sep 21, 2017
mraross
changed the title
In geocoder, add support for an errorFormat flag to get error messages in json instead of html
In geocoder, add support for an errorFormat parameter to support error messages in json instead of html
Sep 21, 2017
mraross
changed the title
In geocoder, add support for an errorFormat parameter to support error messages in json instead of html
In geocoder, add support for error messages in json
May 29, 2018
BK01
changed the title
In geocoder, add support for error messages in json
[?] In geocoder, add support for error messages in json
Feb 27, 2023
BK01
changed the title
[?] In geocoder, add support for error messages in json
In geocoder, add support for error messages in json
Feb 27, 2023
Return a 404 for hard errors. For 'site not found' errors, return a 200 (see #333). |
Validated in geocodertst (version 4.3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, all error responses are in html format.
Change error handling so that:
This is needed by JSON developers since JSON is the format they expect error objects to be in.
I propose we adopt the Google json error object as defined in:
https://google.github.io/styleguide/jsoncstyleguide.xml?showone=error#error
https://google.github.io/styleguide/jsoncstyleguide.xml?showone=error#error
So, for example, a request for a non-existent siteID and json output will return an HTTP Response code of 404 and the following JSON error object:
{
"apiVersion": "3.4",
"error": {
"code": 404,
"message": "Site Not Found",
}
}
The text was updated successfully, but these errors were encountered: