Skip to content
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
Merged

Conversation

@mattjmorrison
Copy link
Contributor

@mattjmorrison 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.

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.
Copy link
Member

@tomchristie tomchristie Sep 17, 2014

Use backticks here, like so...

`APIView` or `@api_view`

@jpadilla
Copy link
Member

@jpadilla jpadilla commented Sep 18, 2014

This looks good to merge

tomchristie added a commit that referenced this issue Sep 18, 2014
Clarify "raised inside REST framework"
@tomchristie tomchristie merged commit ddbd3cb into encode:master Sep 18, 2014
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants