swagger-node-runner icon indicating copy to clipboard operation
swagger-node-runner copied to clipboard

Request validation uses 400 instead of 415 for wrong content type

Open tkalliom opened this issue 7 years ago • 0 comments

When making a request with an unsupported Content-Type header, the produced error body is helpful enough (code: INVALID_CONTENT_TYPE, message: Invalid Content-Type (x). These are supported: y, z...). However, the status code 400 is not the one you would expect; according to the HTTP specification, in this case 415 should be used.

tkalliom avatar Mar 03 '17 13:03 tkalliom