diff --git a/src/lib/request/request.ts b/src/lib/request/request.ts index 3a7b3f9..4db012c 100644 --- a/src/lib/request/request.ts +++ b/src/lib/request/request.ts @@ -44,7 +44,7 @@ const makeSnykRequest = async (request: snykRequest) => { } return res } catch (err) { - switch(err.response.status){ + switch(err.response?.status){ case 401: throw new Error.ApiAuthenticationError(err) case 404: