mobilizon.chapril.org-mobil.../js/src/types/apollo.ts

10 lines
274 B
TypeScript
Raw Normal View History

import { ServerError, ServerParseError } from "apollo-link-http-common";
2019-08-12 16:04:16 +02:00
function isServerError(
err: Error | ServerError | ServerParseError | undefined
): err is ServerError {
2019-08-12 16:04:16 +02:00
return !!err && (err as ServerError).statusCode !== undefined;
}
export { isServerError };