-
Notifications
You must be signed in to change notification settings - Fork 243
Description
This is related to #852 but different enough that I wanted to open a new issue.
Agency references the general Error Messages and Bulk Responses - these describe JSON structures for what succeeded and what failed for a given request. I think this originated in #796 around this commit: 1f4d197
It seems clear that a successful registration/update in an Agency endpoint should return a Bulk Response. #852 is asking which code to use between 200 vs 201.
I'm not as clear on which codes and in what situations either a singular JSON Error Message or a larger JSON Bulk Response (with failures) should be returned?
500
The Responses table for 500 says:
In this case, the answer may contain a
text/plainbody with an error message for troubleshooting.
It seems like the (JSON) Error Message or Bulk Response should not be used here, since the content type is text/plain. Is that correct?
Or should the language around 500 be updated to allow JSON? Would it return Error Message for GET and Bulk Response for POST/PUT?
409
The Responses table for 409 says:
POSToperations when an object already exists and an update is not possible.
This seems like a case for using a Bulk Response - but only for POST? MDN says 409 is more common with PUT.
I also see from the linked commit/PR above that 409 was previously the code associated with these error responses in the Agency docs.
406, 404, and 401
These codes don't really make sense to use with Error Messages or Bulk Responses, no body content is returned with these.
400
Maybe? But then 400 is not referenced in any of the Agency docs, only in the General Info Responses table.