import TraceableError from "./traceableError" ; /**
 * Shape of the `UnknownError` extension.
 */ interface UnknownErrorExtensions { code : string ; message ? : string ; traceID : string ; } /**
 * UnknownServerError wraps any error returned from the
 * server that we don't know of.
 */ export default class UnknownServerError extends TraceableError { public readonly origin : Error ; public readonly code : string ; constructor ( extensions , origin ) { super ( extensions . message || extensions . code , extensions . traceID ) ; if ( Error . captureStackTrace ) { Error . captureStackTrace ( this , UnknownServerError ) ; } this . origin = origin ; this . code = extensions . code ; } }