2020-02-18 08:57:00 +01:00
|
|
|
import { ServerError, ServerParseError } from "apollo-link-http-common";
|
2019-08-12 16:04:16 +02:00
|
|
|
|
2020-02-18 08:57:00 +01: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 };
|