OrchardCMS/OrchardCore · error · Error
is not supported.
Error message
${responseType} is not supported. What it means
The browser FetchHttpClient's deserializeContent helper throws when the requested responseType is one of the browser-unsupported values 'blob', 'document', or 'json'. In browsers, fetch's streaming/text-based handling only supports 'arraybuffer' and 'text' for SignalR transports, so the client rejects other types eagerly.
Solutions
- Use `responseType: 'text'` or `'arraybuffer'` in browser code and parse manually (`JSON.parse(await response.text())`)
- Only use blob/document/json response types with the Node fetch implementation
- Route raw HTTP API calls through plain fetch/axios instead of the SignalR Http client
Example fix
// before
const request = new HttpRequest('POST', url, body, { responseType: 'json' }); // browser: throws
// after
const request = new HttpRequest('POST', url, body, { responseType: 'text' });
const data = JSON.parse(await httpClient.send(request).then(r => r.content)); Defensive patterns
Strategy: validation
Validate before calling
const allowed = ['text','arraybuffer']; if (request.responseType && !allowed.includes(request.responseType) && isBrowser) throw new Error('Unsupported responseType in browser'); Type guard
const isBrowserSafeResponseType = (t) => t === undefined || t === 'text' || t === 'arraybuffer';
Try / catch
try { await client.send(request); } catch (e) { if (/is not supported/.test(e.message)) { request.responseType = 'text'; await client.send(request); } } Prevention
- Use only 'text' or 'arraybuffer' in browser code
- Parse JSON manually from text responses
- Keep browser and Node transports separate
When it happens
Trigger: Passing `responseType: 'blob' | 'document' | 'json'` in an HttpRequest sent through the fetch transport in a browser environment; custom code reusing FetchHttpClient for non-SignalR requests with those response types.
Common situations: Copying Node-style SignalR request options to a browser bundle; custom logging/interceptor transport that sets responseType 'json' for convenience; running the same transport code across Node (supported) and browser (unsupported).
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- No method defined.
- No url defined.
- The type ' ' is not support by Azure AI Search
- The specified grant type is not supported.
- The ' ' argument is required.
AI-assisted analysis of OrchardCMS/OrchardCore@4306c0717f (2026-09-13).
Data as JSON: /api/errors/3434779fc3d409cb.
Report an issue: GitHub.
Appendix: source
Thrown at src/OrchardCore.Modules/OrchardCore.SignalR/wwwroot/Scripts/signalr.js:704
// @ts-ignore: unused variable
this._jar.getCookies(url, (e, c) => cookies = c.join("; "));
}
return cookies;
}
}
function deserializeContent(response, responseType) {
let content;
switch (responseType) {
case "arraybuffer":
content = response.arrayBuffer();
break;
case "text":
content = response.text();
break;
case "blob":
case "document":
case "json":
throw new Error(`${responseType} is not supported.`);
default:
content = response.text();
break;
}
return content;
}
;// CONCATENATED MODULE: ./src/XhrHttpClient.ts
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
class XhrHttpClient extends HttpClient {
constructor(logger) {
super();
this._logger = logger;View on GitHub (pinned to 4306c0717f)