Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove added error information from response

Using flask-restplus I've noticed that if I handle some error like:

api.abort(code=404, message='Item not found')

The response renders:

{
  "message": "Item not found. You have requested this URI [/item/1]
              but did you mean /item/<item_id> ?"
}

I really don't want that extra bit of information but can't find a way to remove it.

Is there one?

like image 735
tutuca Avatar asked Oct 28 '25 14:10

tutuca


1 Answers

So, there is a config flag for this. Reported here

ERROR_404_HELP=False

Does the trick

like image 115
tutuca Avatar answered Oct 31 '25 13:10

tutuca