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

Clearer Error Message for Transaction Not Found #422

Open
leofofeo opened this issue Nov 27, 2019 · 1 comment
Open

Clearer Error Message for Transaction Not Found #422

leofofeo opened this issue Nov 27, 2019 · 1 comment
Labels

Comments

@leofofeo
Copy link

Is your feature request related to a problem? Please describe.
Sending a message to an address with no transactions results in a long error of type "Transaction not found"

Describe the solution you'd like
Map error to a clearer and more concise description of the error.

Additional context

status 500: No transactions found for `address`
github.com/mailchain/mailchain/internal/clients/etherscan.getFromResultHash
	/go/src/github.com/mailchain/mailchain/internal/clients/etherscan/pubkey-finder.go:63
github.com/mailchain/mailchain/internal/clients/etherscan.APIClient.PublicKeyFromAddress
	/go/src/github.com/mailchain/mailchain/internal/clients/etherscan/pubkey-finder.go:37
github.com/mailchain/mailchain/cmd/mailchain/internal/http/handlers.GetPublicKey.func1
	/go/src/github.com/mailchain/mailchain/cmd/mailchain/internal/http/handlers/pubkey.go:56
net/http.HandlerFunc.ServeHTTP
	/usr/local/go/src/net/http/server.go:1995
github.com/gorilla/mux.(*Router).ServeHTTP
	/go/pkg/mod/github.com/gorilla/[email protected]/mux.go:212
github.com/urfave/negroni.Wrap.func1
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:46
github.com/urfave/negroni.HandlerFunc.ServeHTTP
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:29
github.com/urfave/negroni.middleware.ServeHTTP
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:38
github.com/rs/cors.(*Cors).ServeHTTP
	/go/pkg/mod/github.com/rs/[email protected]/cors.go:240
github.com/urfave/negroni.middleware.ServeHTTP
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:38
github.com/urfave/negroni.(*Negroni).ServeHTTP
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:96
net/http.serverHandler.ServeHTTP
	/usr/local/go/src/net/http/server.go:2774
net/http.(*conn).serve
	/usr/local/go/src/net/http/server.go:1878
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1337
github.com/mailchain/mailchain/internal/clients/etherscan.APIClient.PublicKeyFromAddress
	/go/src/github.com/mailchain/mailchain/internal/clients/etherscan/pubkey-finder.go:39
github.com/mailchain/mailchain/cmd/mailchain/internal/http/handlers.GetPublicKey.func1
	/go/src/github.com/mailchain/mailchain/cmd/mailchain/internal/http/handlers/pubkey.go:56
net/http.HandlerFunc.ServeHTTP
	/usr/local/go/src/net/http/server.go:1995
github.com/gorilla/mux.(*Router).ServeHTTP
	/go/pkg/mod/github.com/gorilla/[email protected]/mux.go:212
github.com/urfave/negroni.Wrap.func1
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:46
github.com/urfave/negroni.HandlerFunc.ServeHTTP
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:29
github.com/urfave/negroni.middleware.ServeHTTP
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:38
github.com/rs/cors.(*Cors).ServeHTTP
	/go/pkg/mod/github.com/rs/[email protected]/cors.go:240
github.com/urfave/negroni.middleware.ServeHTTP
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:38
github.com/urfave/negroni.(*Negroni).ServeHTTP
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:96
net/http.serverHandler.ServeHTTP
	/usr/local/go/src/net/http/server.go:2774
net/http.(*conn).serve
	/usr/local/go/src/net/http/server.go:1878
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1337
github.com/mailchain/mailchain/cmd/mailchain/internal/http/handlers.GetPublicKey.func1
	/go/src/github.com/mailchain/mailchain/cmd/mailchain/internal/http/handlers/pubkey.go:62
net/http.HandlerFunc.ServeHTTP
	/usr/local/go/src/net/http/server.go:1995
github.com/gorilla/mux.(*Router).ServeHTTP
	/go/pkg/mod/github.com/gorilla/[email protected]/mux.go:212
github.com/urfave/negroni.Wrap.func1
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:46
github.com/urfave/negroni.HandlerFunc.ServeHTTP
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:29
github.com/urfave/negroni.middleware.ServeHTTP
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:38
github.com/rs/cors.(*Cors).ServeHTTP
	/go/pkg/mod/github.com/rs/[email protected]/cors.go:240
github.com/urfave/negroni.middleware.ServeHTTP
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:38
github.com/urfave/negroni.(*Negroni).ServeHTTP
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:96
net/http.serverHandler.ServeHTTP
	/usr/local/go/src/net/http/server.go:2774
net/http.(*conn).serve
	/usr/local/go/src/net/http/server.go:1878
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1337
@leofofeo leofofeo added the enhancement New feature or request label Nov 27, 2019
@stale stale bot added the Stale label Mar 26, 2020
@mailchain mailchain deleted a comment from stale bot Mar 26, 2020
@stale stale bot removed the Stale label Mar 26, 2020
@robdefeo robdefeo added area/sender enhancement New feature or request and removed enhancement New feature or request labels Mar 26, 2020
@stale
Copy link

stale bot commented Jul 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Mailchain team are limited, and so we are asking for your help. If this is a bug and you can still reproduce this error on the master branch, please reply in order to keep the issue open. If this is a feature request, and you feel that it is still relevant and valuable, please reply in order to keep the issue open. This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Stale label Jul 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants