- const responseContentType = response.headers.get('Content-Type');
- const subType = responseContentType.split('/').pop();
+ if (response.status === 204) {
+ return null;
+ }
+
+ const responseContentType = response.headers.get('Content-Type') || '';
+ const subType = responseContentType.split(';')[0].split('/').pop();