11 lines
324 B
Python
11 lines
324 B
Python
|
from functools import wraps
|
||
|
from flask import request, jsonify
|
||
|
|
||
|
def handle_auth_error(e):
|
||
|
return jsonify({"error": "Please login"}), 401
|
||
|
|
||
|
def handle_invalid_token(e):
|
||
|
return jsonify({"error": "Invalid session token"}), 401
|
||
|
|
||
|
def handle_invalid_header_error(e):
|
||
|
return jsonify({"error": "Please login again"}), 401
|