fix: return when success status 204 (#5562)
* fix: return when success status 204 * fix: handle login in handleZoomResponse * Add response.status check after the response.ok check Co-authored-by: Alex van Andel <me@alexvanandel.com>pull/5501/head^2
parent
3889b49fa1
commit
c728174c14
|
@ -339,7 +339,10 @@ const handleZoomResponse = async (response: Response, credentialId: Credential["
|
|||
}
|
||||
throw Error(response.statusText);
|
||||
}
|
||||
|
||||
// handle 204 response code with empty response (causes crash otherwise as "" is invalid JSON)
|
||||
if (response.status === 204) {
|
||||
return;
|
||||
}
|
||||
return responseClone.json();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue