Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Return 404 code/status on NotFound #22

merged 1 commit into from

2 participants


Currently is returning '200 OK' on NotFound exceptions, and I figured we want to be compliant from the start by returning a 404 :-)

I used the docs for Pyramid 1.3 [1] for the tweak, but I'm not certain if there's a better way to do this.


@tseaver tseaver merged commit 76803de into from

Thanks very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 10, 2013
  1. @kkolev
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  single_file_tasks/src/
3  single_file_tasks/src/
@@ -53,7 +53,8 @@ def close_view(request):
@view_config(context='pyramid.exceptions.NotFound', renderer='notfound.mako')
-def notfound_view(self):
+def notfound_view(request):
+ request.response.status = '404 Not Found'
return {}
Something went wrong with that request. Please try again.