API & Client - update API error messages to remove i18n workarounds
This commit is contained in:
@ -49,7 +49,7 @@ def get_application_config() -> Union[Dict, HttpResponse]:
|
||||
}
|
||||
|
||||
:statuscode 200: success
|
||||
:statuscode 500: Error on getting configuration.
|
||||
:statuscode 500: error on getting configuration
|
||||
"""
|
||||
|
||||
try:
|
||||
@ -57,7 +57,7 @@ def get_application_config() -> Union[Dict, HttpResponse]:
|
||||
return {'status': 'success', 'data': config.serialize()}
|
||||
except (MultipleResultsFound, NoResultFound) as e:
|
||||
return handle_error_and_return_response(
|
||||
e, message='Error on getting configuration.'
|
||||
e, message='error on getting configuration'
|
||||
)
|
||||
|
||||
|
||||
@ -107,11 +107,11 @@ def update_application_config(auth_user_id: int) -> Union[Dict, HttpResponse]:
|
||||
:statuscode 200: success
|
||||
:statuscode 400: invalid payload
|
||||
:statuscode 401:
|
||||
- Provide a valid auth token.
|
||||
- Signature expired. Please log in again.
|
||||
- Invalid token. Please log in again.
|
||||
:statuscode 403: You do not have permissions.
|
||||
:statuscode 500: Error on updating configuration.
|
||||
- provide a valid auth token
|
||||
- signature expired, please log in again
|
||||
- invalid token, please log in again
|
||||
:statuscode 403: you do not have permissions
|
||||
:statuscode 500: error when updating configuration
|
||||
"""
|
||||
config_data = request.get_json()
|
||||
if not config_data:
|
||||
@ -145,7 +145,7 @@ def update_application_config(auth_user_id: int) -> Union[Dict, HttpResponse]:
|
||||
|
||||
except Exception as e:
|
||||
return handle_error_and_return_response(
|
||||
e, message='Error on updating configuration.'
|
||||
e, message='error when updating configuration'
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user