When trying to download a non-existing file from an archive the REST server part throws an exception and sends the exception message with HTTP status code 200 to the client.
I suggest, the REST server should send a 404 HTTP status code. The exception message should be logged, not sent to the client. Maybe it would be a nice idea to to have a configurabe error json object to be send to the client in case of an error; the object could include the exception message for development purposes or internal usage.
This issue has been fixed in the new REST API support with ASP.NET.
The new REST endpoint is : http:// :5001/
Swagger documentation for these APIs can be found at : http://:5001/swagger/index.html
Package explorer can be connected to Aasx-Server by: File -> AASX File Repository -> Connect HTTP/REST Repository and appending "?asp.net" to the new REST endoint as shown in the screenshot.
When trying to download a non-existing file from an archive the REST server part throws an exception and sends the exception message with HTTP status code 200 to the client.
I suggest, the REST server should send a 404 HTTP status code. The exception message should be logged, not sent to the client. Maybe it would be a nice idea to to have a configurabe error json object to be send to the client in case of an error; the object could include the exception message for development purposes or internal usage.
The missing/broken error handling seems to be related to https://github.com/admin-shell-io/aasx-server/issues/58