htl-leo-itp-2325-4-5BHITM / cam-connect

Verleihsystem für das Equipment der HTL-Leonding
The Unlicense
2 stars 0 forks source link

Change everything to CCResponse Objects #46

Closed elYanuki closed 6 months ago

elYanuki commented 9 months ago

start after #21 is done

every endpoint should return a CCResponse

The Response Objects returned by the Resources at the moment simply return okay no matter what happens in the backend. When for example a set or deletion fails for some reason the Response Object should Obviously not be okay. The way to do this is not through boolean returns but by checking values and throwing exceptions and catching those (or just the ones produced by numberformats or whatever) in the Ressource and converting them to Response.status() codes

There also is the option to override the chaotic default exceptions thrown by quarkus to get ccExceptions for things that are automatically caught by Quarkus.

elYanuki commented 6 months ago

seems good