what's it actually returning? What's the 500 and the stacktrace in the log?
I sent some screen , I reproduced your pastebin to catch an exception https://prnt.sc/123j36f and handle it with my function https://prnt.sc/123j4lg but when I test the request I have HttpError 500 instead of 418
what are the app logs saying in conjunction with the 500? Are the app logs quiet and it's just returning 500, or is the application throwing a stacktrace?
https://prnt.sc/1258amm
Here is the stacktrace
hello @j5awry
I successed to make the simple example on your pastebin working.
I tried to implement it on a very simple get routes but It didnt work , https://pastebin.ubuntu.com/p/8NWdRCgz38/
I made to many tests and it always return http error 500.
I'll continue my research
flasgger
is doing could be an interesting entry point. but it's going to take code change in flask-restx
@Gidgidonihah : Reading the code, the intent is that errorhandlers get checked for the restx.API and it's children (restx.API.namespace). It wouldn't make sense, to me, for the framework to go up the chain as well.
So self + children
vs. self + parents + children
. self + children
makes sense to me for checking handlers. But I may be misinterpreting the question?
@Abdur-rahmaanJ If you don't mind me asking, is this an on-prem or cloud hosted? And is it possible to add authentication at other layers? It depends a lot on your setup, but something like using JWT with NGinx, or x509 based auth at Apache Webserver are other possibilities. But there's a lot of nuance there. I do think we need to figure out a better way of handling the pre-generated doc endpoint, and I think what
flasgger
is doing could be an interesting entry point. but it's going to take code change inflask-restx
Cloud-hosted, server-based auth is a great option also but see the above
flask
and werkzeug
both released 2.0.0. unfortunately, there are a few breaking changes we'll need to work through. You can pin flask and werkzeug yourself, but we're also pinning flask-restx for the moment till some upstream things fix, and we can make sure we've got any breaking changes accounted for
werkzeug
and flask
with the flask-restx
.