You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which gives me the error ERROR:rollbar.contrib.fastapi.routing:RollbarLoggingRoute must to be added to a bare router (before adding routes). See docs for more details.
I dug a bit, and the issue seems to be in this section
where the number of expected routes for a bare app is hardwired to 4 (meaning it expects /openapi.json, /docs, /docs/oauth2-redirect, and /redoc), but my app only has one of those (/openapi.json).
I have a FastAPI application where the docs are disabled:
Which gives me the error
ERROR:rollbar.contrib.fastapi.routing:RollbarLoggingRoute must to be added to a bare router (before adding routes). See docs for more details.
I dug a bit, and the issue seems to be in this section
pyrollbar/rollbar/contrib/fastapi/utils.py
Lines 69 to 82 in 77cbffa
/openapi.json
,/docs
,/docs/oauth2-redirect
, and/redoc
), but my app only has one of those (/openapi.json
).Depending on the FastAPI setup, there might be anywhere between 0 and 4 available routes for a "bare" app. I might create a PR for this later, but my suggestion would be checking that there are no available routes other than the ones in the fields
openapi_url
,docs_url
,redoc_url
, andswagger_ui_oauth2_redirect_url
on theFastAPI
object https://github.com/tiangolo/fastapi/blob/3efb4f7edff99fdc12802a85ae9d140ec4772497/fastapi/applications.py#L107-L121The text was updated successfully, but these errors were encountered: