-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds support for instance attribute and custom attributes #11
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, suggested some small improvements.
drf_problems/exceptions.py
Outdated
if isinstance(data, dict): | ||
data['title'] = problem_title | ||
data['status'] = problem_status | ||
data['type'] = problem_type | ||
if problem_instance: | ||
data['instance'] = problem_instance | ||
data.update(problem_extensions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
problem_extensions
should be dict so please do a type check here
Are the changes fine? Can this be merged? |
As I mentioned here #10 I wasn't sure if there was already a way to do this, if there was never mind I guess.
example: