mirror of
https://github.com/PaiGramTeam/SIMNet.git
synced 2024-11-25 23:51:12 +00:00
🎨 Improve BadRequest
This commit is contained in:
parent
ee385fea98
commit
f5664c7de0
@ -63,6 +63,10 @@ class BadRequest(ApiHelperException):
|
|||||||
def response(self) -> dict[str, Union[str, Any, None]]:
|
def response(self) -> dict[str, Union[str, Any, None]]:
|
||||||
return {"retcode": self.ret_code, "message": self.original}
|
return {"retcode": self.ret_code, "message": self.original}
|
||||||
|
|
||||||
|
@property
|
||||||
|
def retcode(self) -> int:
|
||||||
|
return self.ret_code
|
||||||
|
|
||||||
|
|
||||||
class InternalDatabaseError(BadRequest):
|
class InternalDatabaseError(BadRequest):
|
||||||
"""Internal database error."""
|
"""Internal database error."""
|
||||||
|
Loading…
Reference in New Issue
Block a user