wrapper dec: change default error code
This commit is contained in:
parent
8b49c07937
commit
a9c74db4d1
@ -222,7 +222,7 @@ class ResultWrapper(t.Generic[T]):
|
|||||||
|
|
||||||
|
|
||||||
def wrap_result(
|
def wrap_result(
|
||||||
code_on_error: int = DEFAULT_API_ERR_CODE,
|
code_on_error: int = DEFAULT_INTERNAL_ERR_CODE,
|
||||||
) -> Callable[[Callable[P, T]], Callable[P, ResultWrapper[T]]]:
|
) -> Callable[[Callable[P, T]], Callable[P, ResultWrapper[T]]]:
|
||||||
def wrap_result(func: Callable[P, T]) -> Callable[P, ResultWrapper[T]]:
|
def wrap_result(func: Callable[P, T]) -> Callable[P, ResultWrapper[T]]:
|
||||||
@wraps(func)
|
@wraps(func)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user