if (networkError && networkError.name ==='ServerError' && networkError.statusCode === 401) {
// remove cached token on 401 from the server
token = null;
}
the statusCode property wasn't recognized in my editor:
I believe since both ServerError and ServerParseError already include Error with & operator:
@DalerAsrorov: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/
While going over the apollo link example in https://www.apollographql.com/docs/link/links/context/,
the
statusCode
property wasn't recognized in my editor:I believe since both
ServerError
andServerParseError
already includeError
with&
operator:it should make sense to remove it. The TS lint error disappears and allows me to see the valid contents of the error.