Skip to content

Commit

Permalink
Issue webcompat#3204 - Modifies /api/issues to handle error
Browse files Browse the repository at this point in the history
Our function needs probably to be refactored so that
it becomes easier to test. See previous commit.
  • Loading branch information
karlcow committed May 14, 2020
1 parent 7bb82b0 commit 6a2e2d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webcompat/api/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from flask import Blueprint
from flask import g
from flask import request
from flask import Response
from flask import session

from webcompat import app
Expand Down Expand Up @@ -84,7 +85,7 @@ def proxy_issues():
# Non-authed users should never get here--the request is made to
# GitHub client-side)--but return out of paranoia anyways.
elif params.get('q'):
abort(404)
abort(Response('Nope', status=404, content_type='text/plain'))
path = 'repos/{0}'.format(ISSUES_PATH)
return api_request('get', path, params=params)

Expand Down

0 comments on commit 6a2e2d5

Please sign in to comment.