Remove extraneous error messaging

This commit is contained in:
amcmanu3 2024-02-20 18:50:32 -05:00
parent f6242d6507
commit f4f4f9e0b6

View File

@ -124,7 +124,7 @@ class PublicHandler(BaseHandler):
400, 400,
{ {
"status": "error", "status": "error",
"error": "INVALID_JSON_SCHEMA", "error": "VWggb2ghIFN0aW5reS 🪠",
"error_data": str(e), "error_data": str(e),
}, },
) )
@ -145,25 +145,7 @@ class PublicHandler(BaseHandler):
f"User attempting to authenticate from {self.get_remote_ip()}" f"User attempting to authenticate from {self.get_remote_ip()}"
) )
entered_username = nh3.clean(data["username"]) # pylint: disable=no-member entered_username = nh3.clean(data["username"]) # pylint: disable=no-member
try: entered_password = data["password"]
entered_password = data["password"]
except binascii.Error:
return self.finish_json(
403,
{
"status": "error",
"error": "Hello? Hello? Anybody home?"
" Go straight to jail. Do not pass go.",
},
)
except UnicodeDecodeError:
return self.finish_json(
403,
{
"status": "error",
"error": "VWggb2ghIFN0aW5reS 🪠",
},
)
try: try:
user_id = HelperUsers.get_user_id_by_name(entered_username.lower()) user_id = HelperUsers.get_user_id_by_name(entered_username.lower())