github.com/celestiaorg/celestia-node@v0.15.0-beta.1/share/p2p/errors.go (about) 1 package p2p 2 3 import ( 4 "errors" 5 ) 6 7 // ErrNotFound is returned when a peer is unable to find the requested data or resource. 8 // It is used to signal that the peer couldn't serve the data successfully, and it's not 9 // available at the moment. The request may be retried later, but it's unlikely to succeed. 10 var ErrNotFound = errors.New("the requested data or resource could not be found") 11 12 var ErrRateLimited = errors.New("server is overloaded and rate limited the request") 13 14 // ErrInvalidResponse is returned when a peer returns an invalid response or caused an internal 15 // error. It is used to signal that the peer couldn't serve the data successfully, and should not be 16 // retried. 17 var ErrInvalidResponse = errors.New("server returned an invalid response or caused an internal error")