Returns a 405 instead of a 404 on GET /{diagramType}
and GET /{diagramName}/{outputFormat}
#1621
Labels
👶 good first issue
Good for newcomers
💡 proposal
🍩 enhancement
New feature or request
☕ java
Related to Java code
New users are sometimes confused with the 404 status code. For instance,
GET /mermaid
andGET /mermaid/svg
currently returns a 404 because the method GET is not supported (i.e., it expects a POST request with anapplication/json
ortext/plain
payload).In this case, the
Allow
header should be:Similarly, we should make sure that we return a
415 Unsupported Media Type
if the user tries to send a request with an unsupported format (such asapplication/xml
).But we can address this concern in an other issue/pull request.
The text was updated successfully, but these errors were encountered: