Exception
| 85 | |
| 86 | |
| 87 | class CryptKeyMissing(HTTPException): |
| 88 | """ |
| 89 | Exception |
| 90 | """ |
| 91 | CRYPT_KEY_MISSING = "Crypt key is missing." |
| 92 | |
| 93 | def __init__(self): |
| 94 | HTTPException.__init__(self) |
| 95 | |
| 96 | @property |
| 97 | def name(self): |
| 98 | return HTTP_STATUS_CODES.get(503, SERVICE_UNAVAILABLE) |
| 99 | |
| 100 | def get_response(self, environ=None, scope=None): |
| 101 | return service_unavailable( |
| 102 | _(self.CRYPT_KEY_MISSING), |
| 103 | info="CRYPTKEY_MISSING", |
| 104 | ) |
| 105 | |
| 106 | def __str__(self): |
| 107 | return self.CRYPT_KEY_MISSING |
| 108 | |
| 109 | def __repr__(self): |
| 110 | return self.CRYPT_KEY_MISSING |
| 111 | |
| 112 | |
| 113 | class ObjectGone(HTTPException): |
no outgoing calls