eclipse-aaspe / server

C# based server for AASX packages
Other
72 stars 52 forks source link

Download non-existent file from aasx archive broken #76

Closed jankoh closed 2 years ago

jankoh commented 3 years ago

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

juileetikekar commented 2 years ago

@jankoh Thank you for your inputs. We are working on the issue and the fix will be released soon.

juileetikekar commented 2 years ago

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.

image