Hi,
i would like to suggest classifying engine errors (VdcBllMessages)
using these categories:
100-199. entity not found
200-300. missing parameters
300-399. no resources available
400-499. can't perform - user error
500-599. can't perform - server error
600-699. Unauthorized
700-x. Forbidden
this way rest api will be able mapping them to HTTP errors
e.g any error returned by engine CAN_DO_ACTION 100 < x < 200 will be converted
to HTTP 404 with CAN_DO_ACTION message detail
- this can be easily done by assigning id to each VdcBllMessages
enum member in range of one of mentioned categories.
--
Michael Pasternak
RedHat, ENG-Virtualization R&D
--
Michael Pasternak
RedHat, ENG-Virtualization R&D
Show replies by date