backend.components.camera_verification.error_handling

Error Handling

Catches and processes exceptions raised during worker verification and turns them into human-readable responses for REST API, as well as for entry event logging. Handles not only error states, but normal state as well, that is no exception.

Directory Structure

errorConfig.py

  • Contains configurations for Exception processing, defining Response format and mappings of exceptions to messages.

errorService.py

  • Contains logic and functions for processing exceptions into Responses defined in errorConfig.
 1'''
 2# Error Handling
 3Catches and processes exceptions raised during worker verification and turns them into human-readable responses for REST API, as well as for entry event logging. Handles **not only** error states, but normal state as well, that is no exception.
 4
 5## Directory Structure
 6
 7#### `errorConfig.py`
 8- Contains configurations for Exception processing, defining Response format and mappings of exceptions to messages.
 9
10#### `errorService.py`
11- Contains logic and functions for processing exceptions into Responses defined in errorConfig.
12
13'''