Open bergmark opened 10 years ago
Just to clarify: we currently check the accept headers against the provided output types always, but we only check them against the provided error types if an actual error occurs. This means you can have working code, until an error occurs. Then, instead of the error, you'll see that 'unsupported type'.
I wasn't able to reproduce that part, it just responds with json when an error occurs even though it's not in the accept header
Ah, that makes sense. It just picks something to be able to give the original error.
Btw, this is probably low prio since generated clients in #65 will specify both output and error in the accept header if needed.
This is a continuation of #65 that won't make it into that PR.
If you have a resource declaring
fileO . someO . jsonE . someE
and request it withAccept: application/octet-stream
you should get an error, the header should beAccept: application/octetstream,text/json
or equivalent. Otherwise you may get a response in an unexpected format.