Unhandled exception when submitting an invalid function signature
Opened this issue · 0 comments
pipermerriam commented
What is wrong?
File ./func_sig_registry/registry/views.py line 87 in post
if not serializer.is_valid():
Show 3 non-project frames
File ./func_sig_registry/registry/forms.py line 34 in validate_text_signature
return normalize_function_signature(value)
File ./func_sig_registry/utils/solidity.py line 182 in normalize_function_signature
fn_name, args = extract_function_name(raw_signature)
File ./func_sig_registry/utils/solidity.py line 116 in extract_function_name args locals
raise ValueError("Could not parse function signature")
In the event that the submitted raw signature isn't valid the user will end up with a 500 error rather than an error message.
How can it be fixed
Add handling for this and return a friendly error to the user.