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

Clarify "raised inside REST framework" #1882

Merged
merged 2 commits into from Sep 18, 2014

Conversation

Projects
None yet
3 participants
@mattjmorrison
Contributor

mattjmorrison commented Sep 17, 2014

I ran into an issue today where I was not seeing the rest_framework.views.exception_handler do what I thought it should be doing. It turned out that I had imported View from rest_framework.views rather than importing APIView from rest_framework.views. The phrase "raised inside REST framework" was confusing as I was debugging this issue. I was unsure if that meant that I could raise those exceptions in my code or if it had to originate from within framework code.

Clarify "raised inside REST framework"
I ran into an issue today where I was not seeing the rest_framework.views.exception_handler do what I thought it should be doing. It turned out that I had imported View from rest_framework.views rather than importing APIView from rest_framework.views. The phrase "raised inside REST framework" was confusing as I was debugging this issue. I was unsure if that meant that I could raise those exceptions in my code or if it had to originate from within framework code.

I'm not sure if the proposed wording is ideal, I just wanted to point out what I found to be confusing.
@@ -84,7 +84,7 @@ Note that the exception handler will only be called for responses generated by r
**Signature:** `APIException()`
The **base class** for all exceptions raised inside REST framework.
The **base class** for all exceptions raised inside an APIView class or @api_view.

This comment has been minimized.

@tomchristie

tomchristie Sep 17, 2014

Member

Use backticks here, like so...

`APIView` or `@api_view`
@jpadilla

This comment has been minimized.

Member

jpadilla commented Sep 18, 2014

This looks good to merge

tomchristie added a commit that referenced this pull request Sep 18, 2014

Merge pull request #1882 from mattjmorrison/patch-2
Clarify "raised inside REST framework"

@tomchristie tomchristie merged commit ddbd3cb into encode:master Sep 18, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment