Skip to content

Commit

Permalink
Issue webcompat#929 - Removing GitHubError as 401 error code is alrea…
Browse files Browse the repository at this point in the history
…dy handled
  • Loading branch information
deepthivenkat committed Apr 13, 2016
1 parent cab3a29 commit f74e23d
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions webcompat/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import json
import urllib

from flask.ext.github import GitHubError
from flask import abort
from flask import flash
from flask import g
Expand Down Expand Up @@ -44,8 +43,7 @@
404: 'Not Found. Lost in Punk Cat Space',
429: 'Cool your jets! Please wait {0} seconds before making'
'another search.',
500: 'Internal Server Error',
'GitHubError': 'Something bad happened. Please try again?'}
500: 'Internal Server Error'}


@app.teardown_appcontext
Expand Down Expand Up @@ -296,15 +294,6 @@ def cssfixme():
'''Route for CSS Fix me tool'''
return render_template('cssfixme.html')


@app.errorhandler(GitHubError)
def jumpship(e):
print('jumpship! ', e)
session.pop('user_id', None)
flash(ERROR_DICT['GitHubError'], 'error')
return redirect(url_for('index'))


@app.errorhandler(400)
@app.errorhandler(401)
@app.errorhandler(403)
Expand Down

0 comments on commit f74e23d

Please sign in to comment.