-
-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File contents endpoint returns invalid Content-Type
and wrong status code
#964
Comments
I think this has already been addressed and will be included for the next beta release Edit: This should be in beta 9 of wings. can you verify wings is up to date? |
@notAreYouScared Seems like the node I that was actually returning the file for my request was indeed on an older version. With the current version it will throw a 500 error with"code": "FileNotFoundException" 👍 Still not the correct status code though! |
Is that file in a directory that does not exist? |
Current Behavior
When requesting file contents of a file that does not exist via the client api an malformed response is returned.
For exmaple:
GET https://<url-to-panel>/api/client/servers/<server-id>/files/contents?file=<non-existent-file>
Will return:
Content-Type:
text/plain; charset=UTF-8
Status: 200
Body:
{"error":"An unexpected error was encountered while processing this request","request_id":"..."}
Expected Behavior
When requesting a file that does not exist the api should return a status 404 with the current error message and a Content-Type of
application/json
.Steps to Reproduce
Request the contents of any file that does not exist via the client api as outlined in current behaviour.
Panel Version
1.0.0-beta17
Wings Version
1.0.0-beta9
Games and/or Eggs Affected
No response
Docker Image
No response
Error Logs
Is there an existing issue for this?
The text was updated successfully, but these errors were encountered: