Skip to content
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

027-Clarity-Status code for SDMX error 150? #64

Closed
dosse opened this issue Jun 1, 2018 · 1 comment
Closed

027-Clarity-Status code for SDMX error 150? #64

dosse opened this issue Jun 1, 2018 · 1 comment

Comments

@dosse
Copy link
Contributor

dosse commented Jun 1, 2018

In 4_7_errors.md, shouldn't the HTTP status code for the SDMX error 150 "Semantic error" not be "422 Unprocessable Entity" (rather than currently "403 Forbidden")?

The SDMX description is:

   Semantic error - 150
   A web service should return this error when a request is 
   syntactically correct but fails a semantic validation or 
   violates agreed business rules.

See https://tools.ietf.org/html/rfc4918#section-11.2 :

   The 422 (Unprocessable Entity) status code means the server
   understands the content type of the request entity (hence a
   415(Unsupported Media Type) status code is inappropriate), and the
   syntax of the request entity is correct (thus a 400 (Bad Request)
   status code is inappropriate) but was unable to process the contained
   instructions.  For example, this error condition may occur if an XML
   request body contains well-formed (i.e., syntactically correct), but
   semantically erroneous, XML instructions."

A sub-question:
How should the server behave if a data query contains valid and invalid codes in the key parameter? Should the service return the available data only for the valid codes and ignore the others, or refuse the execution and return an SDMX 150 error? This would be worthwhile to be clarified in the standard so that client applications can expect a consistent behaviour.

@sosna sosna added this to the 2019 milestone Oct 11, 2018
@sosna sosna self-assigned this Oct 29, 2018
@sosna
Copy link
Member

sosna commented Nov 12, 2018

Findings

Proposed code 422:

Open question: Would this break backward compatibility?

@sosna sosna changed the title Wrong http status code for SDMX error 150? Status code for SDMX error 150? May 19, 2020
@sosna sosna added the sdmx 3.0 label Sep 3, 2020
@sosna sosna changed the title Status code for SDMX error 150? 027-Clarity-Status code for SDMX error 150? Sep 3, 2020
@sosna sosna closed this as completed Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants