MCPcopy Create free account
hub / github.com/etesync/server / HttpError

Class HttpError

etebase_server/fastapi/exceptions.py:76–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74
75
76class HttpError(CustomHttpException):
77 def __init__(
78 self,
79 code: str,
80 detail: str,
81 status_code: int = status.HTTP_400_BAD_REQUEST,
82 errors: t.Optional[t.List["HttpError"]] = None,
83 ):
84 self.errors = errors
85 super().__init__(code=code or "generic_error", detail=detail, status_code=status_code)
86
87 @property
88 def as_dict(self) -> dict:
89 return HttpErrorOut(code=self.code, errors=self.errors, detail=self.detail).dict()
90
91
92class ValidationError(HttpError):

Callers 14

get_stoken_objFunction · 0.85
get_object_or_404Function · 0.85
_sanitize_pathFunction · 0.85
sendfileFunction · 0.85
resetFunction · 0.85
validate_login_requestFunction · 0.85
dashboard_urlFunction · 0.85
signup_saveFunction · 0.85
validate_dbMethod · 0.85
outgoing_createFunction · 0.85
item_bulk_commonFunction · 0.85

Calls

no outgoing calls

Tested by 1

resetFunction · 0.68