gholamimohsen / StilGalleriet

StillGalleriet
3 stars 0 forks source link

handling with EntityNotFoundException for missing info in OrderService #54

Closed Ilhamfeysel closed 5 months ago

Ilhamfeysel commented 5 months ago

The problem was when someone entered wrong order info, the app showed un authentication error instead of the real problem, like when a buyer, seller, or ad was missing. I fixed it by always using the same kind of error notice, EntityNotFoundException, I made necessary adjustments in both the OrderController and OrderService , Users now receive accurate error messages that correctly reflect the nature of the issue.

Shumisen commented 5 months ago

Some methods have proper response on error. In the future this can be implemented to all methods for good measure.