class ServerError extends Error {
  constructor ({ statusCode, reason, error }, query) {
    super(`Cubic-client encountered an error while requesting ${query}: ${statusCode} - ${reason}`)
    this.statusCode = statusCode
    this.reason = reason
    this.error = error
  }
}

export default ServerError

class ServerError extends Error {
  constructor ({ statusCode, body }, query) {
    super(`Cubic-client encountered an error while requesting ${query}: ${statusCode} - ${body.error} (${body.reason})`)
    this.statusCode = statusCode
    this.reason = body.reason
    this.error = body.error
  }
}

export default ServerError

Fix ServerErrors returning `undefined` as reason.
fix: Fix ServerErrors returning `undefined` as reason.
