• Martin Prudek's avatar
    Refactor exceptions · 3839367f
    Martin Prudek authored
    These exception are now used
    - `CertAPISystemError` should be used for sentinel-internal errors
      - its child `InvalidRedisDataError` is risen when validation of data
        saved in Redis failes
    - `RequestConsistencyError` should be used for client request that cant be
       processed
    - `RequestProcessError` should be used for client request that can be processed,
       but the provided data is invalid, including checker/CA authentication
       failure
    
    Among these exception the logging should be done this way:
    - `RequestConsistencyError` and `RequestProcessError` should be logged on it's
      first occurence with levels `debug`, `info` and `warning` for most severe
      cases
    - `CertAPISystemError` should be logged centrally in one place with levels
      `error` for most cases and `critical` when the application needs to stop
    - `InvalidRedisDataError` is never logged
    3839367f