Skip to content

fixed unhandled exceptions and added missing input validation in sui /query endpoint#10

Open
adityamane765 wants to merge 1 commit into
DefiLlama:masterfrom
adityamane765:fix/sui-query-validation
Open

fixed unhandled exceptions and added missing input validation in sui /query endpoint#10
adityamane765 wants to merge 1 commit into
DefiLlama:masterfrom
adityamane765:fix/sui-query-validation

Conversation

@adityamane765
Copy link
Copy Markdown

the /query handler had no try/catch, so any malformed input or RPC failure would throw an unhandled exception with no response sent to the caller. also target, contractId and sender were used directly without checking they exist. added a 400 for missing required fields and wrapped the handler in try/catch returning a 500 on failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant