device-manager.app.main#

Main file for the device manager service.

Attributes#

Functions#

custom_http_exception_handler(request, exc)

Add logging for http exceptions.

validation_exception_handler(request, exc)

Add logging for fastAPI's automatic input validation exceptions.

startup()

Inititalize database on startup.

readiness(→ dict)

Readiness health endpoint.

Module Contents#

device-manager.app.main.app#
device-manager.app.main.origins = ['http://localhost:8080', 'https://localhost:8443']#
async device-manager.app.main.custom_http_exception_handler(request, exc)#

Add logging for http exceptions.

https://fastapi.tiangolo.com/tutorial/handling-errors/#reuse-fastapis-exception-handlers

async device-manager.app.main.validation_exception_handler(request, exc)#

Add logging for fastAPI’s automatic input validation exceptions.

https://fastapi.tiangolo.com/tutorial/handling-errors/#reuse-fastapis-exception-handlers

async device-manager.app.main.startup()#

Inititalize database on startup.

async device-manager.app.main.readiness() dict#

Readiness health endpoint.

Inspects sqlalchemy engine and check if workflow table exists.

Returns#

Status docstring

Raises#

HTTPException

500: Workflow table not found