When the line response.body is commented out, hitting that endpoint will result in a 404. When the line is uncommented out, a 401 is returned. It doesn't seem like we should have to set the response body.
Routes need to return a value (or have a body set), or they will result in a 404. It's known behavior, but it hasn't been changed because of backwards compatibility.
It seems spark will return a 404 when an
exception
handler does not set the response body. The following should reproduce the issue:When the line
response.body
is commented out, hitting that endpoint will result in a 404. When the line is uncommented out, a 401 is returned. It doesn't seem like we should have to set the response body.