EUDAT-B2STAGE / http-api

RESTful HTTP-API for the B2STAGE service inside the EUDAT project
https://eudat-b2stage.github.io/http-api/
MIT License
7 stars 7 forks source link

Not urgent(nice-to-have): More specific error return code (deletion of SeaData-orders) #130

Closed merretbuurman closed 6 years ago

merretbuurman commented 6 years ago

When deleting orders, it would be nice whether we know if the order was already deleted before (order does not exist), or whether we have no permissions (which means that the order is still there). These two things would require different actions from the client...

celery_1        | 2018-10-29T18:26:01.982087506Z [2018-10-29 18:26:01,980: INFO/ForkPoolWorker-1] {'parameters': {'request_id': 'not_sure_what_they_want_here_either'}, 'request_id': 'c93f6e1b-39b6-4db1-ad57-0d7a434831c2', 'errors': [{'error': '4016', 'description': 'Order does not exist or you lack permissions', 'subject': '123'}, {'error': '4016', 'description': 'Order does not exist or you lack permissions', 'subject': '234'}], 'edmo_code': 'xxx', 'datetime': '20181029T18:26:01', 'api_function': 'unknown_function_ready', 'version': '1.0.4.0011'}

(Branch 1.0.4, microversion 0011)

merretbuurman commented 6 years ago

Sorry, I can not label. This is just an enhancement.

mdantonio commented 6 years ago

The lack of permission is a standard addendum to the not existing error (the meaning is that: If I don't find a resource I cannot understand if the resource does not exist OR it exists but i'm not allowed to see it). Since the deletion is executed at admin level it should never occur