Skip to content
This repository was archived by the owner on Jan 17, 2021. It is now read-only.

Handle errors when an invalid outpoint is requested #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

afilini
Copy link
Contributor

@afilini afilini commented Feb 27, 2019

Instead of printing horrible panic messages, gracefully handle the error and show a human-readable message when a request for an invalid outpoint is sent

Instead of printing horrible panic messages, gracefully handle the error and show a human-readable message when a request for an invalid outpoint is sent
@afilini afilini requested a review from isghe February 27, 2019 20:20
Copy link
Contributor

@isghe isghe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's solve also the:

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: ParseFailed("String was not valid UTF8")', src/libcore/result.rs:1009:5

generated with sendtoaddress, burn and sync.

the problem looks to be at:

10: <bifrost::server::RGBServer as hyper::server::Handler>::handle
             at src/server.rs:90

https://github.com/rgb-org/bifrost/blob/938c45549bcefa761cfaac9f36d1b91628e441a6/src/server.rs#L90

@afilini afilini requested a review from isghe March 3, 2019 21:00
Copy link
Contributor

@isghe isghe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sendtoaddress:

Could not decode the uploaded proof for `/0fc882921eee7219ea267b8a3c8f969466dedcae6344fc3511cf68862402d83b:0`: parse failed: String was not valid UTF8

burn:

Invalid outpoint in POST req for `/e579cf5fca529091e9ac5a23a1a23c7dc6ada7dee8962d4aea92713461617215:BURN`
Could not decode the uploaded proof for `/e579cf5fca529091e9ac5a23a1a23c7dc6ada7dee8962d4aea92713461617215:0`: parse failed: String was not valid UTF8

and the folder .rgb-server is empty.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants