Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
Requesting the file contents of a directory that does not exist returns an HTTP 500 error response
Expected Behavior
The API (Wings) should return the appropriate 404 error when a directory is not found.
Steps to Reproduce
Make a GET request to /api/client/servers/<id>/files/list?directory=unknown or whatever directory name you want that doesn't exist in the server.
Panel Version
1.11.2
Wings Version
1.11.0
Games and/or Eggs Affected
No response
Docker Image
No response
Error Logs
[2022-12-30 12:13:07] local.ERROR: GuzzleHttp\Exception\ServerException: Server error: `GET http://169.254.234.1:8080/api/servers/c094c33e-a5cd-4157-aa81-963a78931f78/files/list-directory?directory=unknown` resulted in a `500 Internal Server Error` response:
{"error":"An unexpected error was encountered while processing this request","request_id":"45665423-a3d9-426d-b861-47647 (truncated...)
Current Behavior
Requesting the file contents of a directory that does not exist returns an HTTP 500 error response
Expected Behavior
The API (Wings) should return the appropriate 404 error when a directory is not found.
Steps to Reproduce
Make a GET request to
/api/client/servers/<id>/files/list?directory=unknown
or whatever directory name you want that doesn't exist in the server.Panel Version
1.11.2
Wings Version
1.11.0
Games and/or Eggs Affected
No response
Docker Image
No response
Error Logs
Is there an existing issue for this?