[Mailman-Developers] REST API returns are plain text for errors, JSON or nothing for successful
andrew.stuart at supercoders.com.au
Sat Jan 10 05:42:30 CET 2015
Successful requests to the REST API return a 2xx HTTP code to indicate success either with or without JSON data depending on the context of the request.
At least one (I’ve not checked the othes yet) 4xx error returned from the REST API returns a plain text error message rather than a JSON error message.
For example attempting to create a domain that exists returns a 400 error with the response text “Domain exists”.
Do you think this matters? Probably not much but does mean handling valid responses goes down a JSON path and handling error message goes down a plain text path. JSON error messages might arguable have been somewhat more consistent and programmable.
More information about the Mailman-Developers