senaite / senaite.jsonapi

RESTful JSON API for SENAITE
https://www.senaite.com
GNU General Public License v2.0
11 stars 19 forks source link

Fix no error message is sent back for push consumer calls #49

Closed xispa closed 1 year ago

xispa commented 1 year ago

Description of the issue/feature this PR addresses

This Pull Request ensures that when push consumer fails, an error message is always sent back in accordance, regardless of the Exception type.

Current behavior before PR

{
"_runtime": 85.57789301872253,
"message": "",
"success": false
}

Desired behavior after PR is merged

{
"_runtime": 0.0049631595611572266,
"message": "[Errno 13] Permission denied: '/home/senaite'",
"success": false
}

-- I confirm I have tested the PR thoroughly and coded it according to PEP8 standards.