Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use better storage error in tests #831

Merged
merged 2 commits into from
Jan 19, 2023
Merged

Conversation

sisuresh
Copy link
Contributor

@marta-lokhova ran into this error in a test case when trying to retrieve data that didn't exist -

Value: Status(HostStorageError(UnknownError))

Debug events (newest first):
   0: "escalating error 'Status(HostStorageError(UnknownError))' to panic"
   1: "contract call invocation resulted in error Status(HostStorageError(UnknownError))"
   2: "caught panic from contract function 'Symbol(attend)', propagating escalated error 'Status(HostStorageError(UnknownError))'"
   3: "escalating error 'Status(HostStorageError(UnknownError))' to panic"
   10: ... elided ...

This error doesn't mention the issue, which is that the key doesn't exist. With the change in this PR, the error will look like -

Value: Status(HostStorageError(MissingKeyInGet))

Debug events (newest first):
   0: "escalating error 'Status(HostStorageError(MissingKeyInGet))' to panic"
   1: "contract call invocation resulted in error Status(HostStorageError(MissingKeyInGet))"
   2: "caught panic from contract function 'Symbol(get)', propagating escalated error 'Status(HostStorageError(MissingKeyInGet))'"
   3: "escalating error 'Status(HostStorageError(MissingKeyInGet))' to panic"

@leighmcculloch leighmcculloch enabled auto-merge (squash) January 19, 2023 20:48
@leighmcculloch leighmcculloch merged commit a68335e into stellar:main Jan 19, 2023
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.

2 participants