Error processing error message when task fails

Problem:

When I POST on “pulp/api/v3/content/file/files/” back-end I recieve task which then fails. It is ok. But I can’t get normal error message to display. When task fails error message in “description” tag is not returned as valid json object.

I got this:
“error”:{
“traceback”:" …
“description”:"{‘non_field_errors’: [ErrorDetail(string=“There is already a file content with relative path ‘pip.plugin.bitwarden/pip.plugin.bitwarden-1.0.0.tar.gz’ and digest ‘2ba0629a027100546a2919f432a484961ba7cf0308fab341d87cb7dffb9f8b29’.”, code=‘invalid’)]}"
},

Is it possible to not receive ErrorDetail object but normal json object?

Expected outcome:

“error”:{
“traceback”:" …
“description”:"{‘non_field_errors’: [{“message”:“There is already a file content with relative path ‘pip.plugin.bitwarden/pip.plugin.bitwarden-1.0.0.tar.gz’ and digest ‘2ba0629a027100546a2919f432a484961ba7cf0308fab341d87cb7dffb9f8b29’.”, “code”:‘invalid’}]}"
},

Pulpcore version:

Latest dokcker version

Pulp plugins installed and their versions:

Default plugins available in docker image

Operating system - distribution and version:

Linux.

I’m not entirely sure if this is a bug or a feature request, but can you file an issue with pulpcore please?

I created bug pulpcore team can change type afterwards

2 Likes