redirectory.libs_int.service.api_actions module¶
-
redirectory.libs_int.service.api_actions.
api_error
(message: str, errors: Union[str, list], status_code: int)[source]¶ Returns an api error with a given status and a message/messages
Parameters: - message – A overall message of the error. E.g. Wrong input.
- errors – A message in str format or a list of strings for multiple error messages
- status_code – The status of the error. E.g. 404, 503 ..