oasis-tcs / cti-taxii2

OASIS CTI TC: An official CTI TC repository for TAXII 2 work
https://github.com/oasis-tcs/cti-taxii2
Other
9 stars 4 forks source link

Add some HTTP error codes to POST endpoint #75

Closed jordan2175 closed 6 years ago

jordan2175 commented 6 years ago

We should probably add some more common HTTP error codes POST endpoints.

varnerac commented 6 years ago
jordan2175 commented 6 years ago

The errors code for a POST are now defined as:

202 - The request was successful accepted

401 - The client needs to authenticate.

403 - The client does not have access to write to this resource.

404 - The client can not write to this resource or it is not available.

413 - The POSTed payload exceeds the max_content_length of the API Root.

415 - The client attempted to POST a payload with a content type the server does not support.

422 - The object type or version is not supported or could not be processed. This can happen, for example, when sending a version of STIX that this TAXII Server does not support and cannot process, when sending a malformed body, or other unprocessable content.