ap-test/ap/errors.py
Aravinth Manivannan 73430848e8
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
feat: init ap server w webfinger endpoint
2023-10-06 19:14:14 +05:30

17 lines
349 B
Python

from flask import jsonify, Response as FlaskResponse
def bad_req(msg):
"""400 bad request status code"""
res = FlaskResponse()
res.status_code = 400
res.data = msg
return res
def not_found(msg):
"""404 not found request status code"""
res = FlaskResponse()
res.status_code = 404
res.data = msg
return res