import has from 'lodash/has';

export interface ErrorResponse {
  message: string;
  errorCode: number;
}

export function isErrorResponse(res: unknown): res is ErrorResponse {
  return has(res, 'errorCode');
}
