github.com/lazyledger/lazyledger-core@v0.35.0-dev.0.20210613111200-4c651f053571/light/provider/errors.go (about) 1 package provider 2 3 import ( 4 "errors" 5 "fmt" 6 ) 7 8 var ( 9 // ErrLightBlockNotFound is returned when a provider can't find the 10 // requested header. 11 ErrLightBlockNotFound = errors.New("light block not found") 12 13 // ErrDAHeaderNotFound is returned when a provider can't find the 14 // requested DataAvailabilityHeader. 15 ErrDAHeaderNotFound = errors.New("data availability header not found") 16 // ErrNoResponse is returned if the provider doesn't respond to the 17 // request in a given time 18 ErrNoResponse = errors.New("client failed to respond") 19 ) 20 21 // ErrBadLightBlock is returned when a provider returns an invalid 22 // light block. 23 type ErrBadLightBlock struct { 24 Reason error 25 } 26 27 func (e ErrBadLightBlock) Error() string { 28 return fmt.Sprintf("client provided bad signed header: %s", e.Reason.Error()) 29 }