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

8 lines
270 B
TypeScript
Raw Normal View History

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