error.go 298 B

1234567891011121314151617
  1. package bullet
  2. import (
  3. "fmt"
  4. )
  5. type bulletError struct {
  6. Error struct {
  7. Cat string `json:"cat"`
  8. Message string `json:"message"`
  9. Type string `json:"type"`
  10. } `json:"error"`
  11. }
  12. func (be bulletError) getError() error {
  13. return fmt.Errorf("%s: %s", be.Error.Type, be.Error.Message)
  14. }