freme-project / pipelines

Apache License 2.0
0 stars 0 forks source link

Test of pipeline 1 from the #45 with invalid pipeline failed #11

Closed m1ci closed 9 years ago

m1ci commented 9 years ago

e-Entity -> e-Link

curl -v -d @pipeline1.json -X POST -H "Content-Type: application/json" "http://localhost:8080/pipelining/chain"

pipeline1.json is the same e-Entity -> e-Link pipeline however changes were made to be invalid JSON.

Results:

ghsnd commented 9 years ago

Should be fixed, though JSON errors are now 406 Not Acceptable errors. Should I change the error code? This influences other the issues as well...

m1ci commented 9 years ago

checked, and it returns 406. Regarding the 406 status code - from its definition it is defined as:

The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.

According to my understanding, 406 should be returned only if the format specified in the Accept header is not supported. In our case, our service do understand the format of the request, but the request is not-well formatted. IMO, 406 is not appropriate and 400 fits better.

What do you think? Do you have same or different understanding?

ghsnd commented 9 years ago

You are completely right! The code is changed to 400 now.

jnehring commented 9 years ago

Can we close this issue?