mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Add error handling
This adds an /error/XXX endpoint that triggers the corresponding XXX error code and its handling. Related: https://github.com/alphagov/notifications-aws/pull/331
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from flask import redirect, render_template, request, url_for
|
||||
from flask import redirect, render_template, request, url_for, abort
|
||||
from flask_login import current_user, login_required
|
||||
from notifications_utils.international_billing_rates import (
|
||||
INTERNATIONAL_BILLING_RATES,
|
||||
@@ -18,6 +18,11 @@ def index():
|
||||
return render_template('views/signedout.html')
|
||||
|
||||
|
||||
@main.route('/error/<int:status_code>')
|
||||
def error(status_code):
|
||||
abort(status_code)
|
||||
|
||||
|
||||
@main.route("/verify-mobile")
|
||||
@login_required
|
||||
def verify_mobile():
|
||||
|
||||
Reference in New Issue
Block a user