mobilizon.chapril.org-mobil.../js/src/types/apollo.ts
Thomas Citharel 4144e9ffd0
Introduce group basic federation, event new page and notifications
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-06-03 16:01:26 +02:00

10 lines
274 B
TypeScript

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 };