ErrorType

public enum ErrorType : Equatable

Categories of errors that are possible

  • rpc

    RPC errors come directly from the Tezos RPC, but with the massive JSON object filtered down to the most meraningful part

    Declaration

    Swift

    case rpc
  • System errors are ones coming from the OS, e.g. “No internet connection”

    Declaration

    Swift

    case system
  • Network errors are returned by a server, such as HTTP 404’s and 500’s

    Declaration

    Swift

    case network(Int)
  • Internal application errors are errors from other services, components, libraiers etc, wrapped up so that they don’t require extra parsing

    Declaration

    Swift

    case internalApplication
  • For situations where the wrong model is returned. This can happen sometimes unexpectedily in GraphQL based APIs, instead of returning an error, it will just return a partial object missing non-optional fields

    Declaration

    Swift

    case decodingError
  • For clients to catch known errors, sometimes handled in odd ways, enabling the easy return of a String. E.g. GraphQL throwing a malformed object response for a situation that should be a 404

    Declaration

    Swift

    case knownError
  • Used as a fallback for strange edge cases where we can’t easily idenitfiy the issue

    Declaration

    Swift

    case unknown