phaidra / phaidra-api

RESTish API to Phaidra
Apache License 2.0
6 stars 4 forks source link

Modify uwmetadata doesn't output "status" in the response when error occurs #71

Open giulioturetta opened 2 years ago

giulioturetta commented 2 years ago

Use case: trying to modify uwmetadata of an inactive object via POST uwmetadata call.

Log:

[2022/04/16 17:50:31] [ERROR] [6227] [error] 401: 401

API call response: {"alerts":[{"msg":"401","type":"danger"}]}

giulioturetta commented 2 years ago

It seems POST uwmetadata call doesn't output status in JSON response even when it is successful.

giulioturetta commented 1 year ago

In the object/PID/uwmetadata POST call, status is (only) in the HTTP response status code.

Phaidra API is not consistent though, sometimes status exists in the JSON output (e.g. the object/PID/modify POST call), and sometimes not.