mirror of
https://github.com/EDCD/EDDN.git
synced 2025-06-17 15:51:01 +03:00
Gateway: typing: parse_and_error_handle()
This commit is contained in:
parent
35b90de06d
commit
9be3cd82d8
@ -188,7 +188,7 @@ def get_decompressed_message() -> bytes:
|
|||||||
return message_body
|
return message_body
|
||||||
|
|
||||||
|
|
||||||
def parse_and_error_handle(data):
|
def parse_and_error_handle(data: str) -> str:
|
||||||
"""
|
"""
|
||||||
Parse an incoming message and handle errors.
|
Parse an incoming message and handle errors.
|
||||||
|
|
||||||
@ -218,7 +218,7 @@ def parse_and_error_handle(data):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
response.status = 400
|
response.status = 400
|
||||||
logger.error(f"Error to {get_remote_address()}: {exc.message}")
|
logger.error(f"Error to {get_remote_address()}: {exc}")
|
||||||
return str(exc)
|
return str(exc)
|
||||||
return 'FAIL: JSON parsing: ' + str(exc)
|
return 'FAIL: JSON parsing: ' + str(exc)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user