inveniosoftware / inveniosoftware/dojson

When reporting missing rules, pass original blob to exception handler

Open
#146 0 comments 1 reaction 0 assignees View on GitHub
Type: enhancement
Dominant language
Python
Stars
11
Forks
30
PR merge metrics
No merged PRs in 30d

Description

In https://github.com/inveniosoftware/dojson/blob/master/dojson/overdo.py#L163:

``` python
except Exception as exc:
if exc.__class__ in handlers:
handler = handlers[exc.__class__]
if handler is not None:
handler(exc, output, key, value)
else:
raise
```

what about passing to `handler` also the original `blob` variable? In this way the handler would have the original input and would be able to output more detailed information (e.g. say it could retrieve an record ID).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.