I am trying to implement custom messages for error codes like 401, 400 but it is not working. Only error code 404 is working.
My code is as follows:
app.py