So as far as i can tell i am not running the app in debug mode. This is what i have on boot:
plugin_config = PluginConfig(
do_logging=True,
do_after_exception=False,
do_cache=False,
do_compression=False,
do_collection_dependencies=False,
do_exception_handlers=False,
do_health_check=False,
do_openapi=False,
do_sentry=False,
do_set_debug=False,
do_sqlalchemy_plugin=True,
do_type_encoders=False,
do_worker=False,
)
def run_app() -> Starlite:
logger.info("starting server")
app = Starlite(
after_exception=[exceptions.after_exception_hook_handler],
cache_config=cache.config,
compression_config=compression.config,
cors_config=cors.cors_config,
# not needed if jwt cookie uses sameSite=lax/strict
# csrf_config=csrf.csrf_config,
dependencies=dependencies,
exception_handlers={
RepositoryException: exceptions.repository_exception_to_http_response,
ServiceException: exceptions.service_exception_to_http_response,
},
# logging_config=logging.CustomConfigureApp,
openapi_config=openapi.config,
route_handlers=[health_check, router],
# plugins=[SQLAlchemyPlugin(config=sqlalchemy_plugin.config)],
on_shutdown=[
kafka_consumer.on_app_stop,
kafka_producer.on_app_stop,
redis.close,
s3_client.close,
],
on_startup=[
sentry.configure,
get_redis_connection,
kafka_producer.on_app_start,
kafka_consumer.on_app_start,
],
static_files_config=static_files.config,
type_encoders=type_encoders_map,
on_app_init=[CustomConfigureApp(plugin_config), auth.jwt_cookie_auth.on_app_init],
)
return app