File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ function request(url, options) {
5252 credentials : "include" ,
5353 headers : {
5454 ...( options . headers || { } ) ,
55- "accept" : "application/vnd.api+json" ,
55+ "accept" : "application/vnd.api+json, application/problem+json " ,
5656 } ,
5757 } ;
5858 return fetch ( url , init ) ;
@@ -195,7 +195,10 @@ export default function Client(initialURL) {
195195 return false ;
196196 }
197197 const mimeType = response . headers . get ( "content-type" ) ;
198- if ( ! mimeType . startsWith ( "application/vnd.api+json" ) ) {
198+ if (
199+ ! ( mimeType . startsWith ( "application/vnd.api+json" ) ||
200+ mimeType . startsWith ( "application/problem+json" ) )
201+ ) {
199202 const problem = new UnexpectedContentTypeError (
200203 response ,
201204 `the server responded in with an unrecognizable media type: ${ mimeType } ` ,
You can’t perform that action at this time.
0 commit comments