dotnet/aspnetcore · error · Error
is not supported.
Error message
${responseType} is not supported. What it means
deserializeContent switches on the request's responseType and explicitly rejects 'blob', 'document', and 'json' with a thrown Error. Only 'arraybuffer', 'text', and undefined/fallback are supported, because the SignalR client only needs binary and text payloads.
Solutions
- Use responseType 'arraybuffer' (binary) or 'text' (JSON/JSON-protocol), or omit it to default to text.
- If you genuinely need blob/json, implement a custom HttpClient rather than reusing FetchHttpClient with an unsupported responseType.
- Audit any code that builds HttpRequest literals for the SignalR client and remove responseType values other than text/arraybuffer.
Example fix
// before
const resp = await httpClient.get(url, { responseType: "json" });
// after
const resp = await httpClient.get(url, { responseType: "text" });
const data = JSON.parse(resp.content as string); Defensive patterns
Strategy: validation
Validate before calling
const ALLOWED = new Set(["arraybuffer", "text", undefined]);
function assertResponseType(rt?: XMLHttpRequestResponseType): void {
if (!ALLOWED.has(rt)) throw new Error(`Unsupported responseType: ${rt}`);
} Type guard
function isSupportedResponseType(rt: unknown): rt is "arraybuffer" | "text" | undefined {
return rt === undefined || rt === "arraybuffer" || rt === "text";
} Try / catch
try { await httpClient.get(url, { responseType }); }
catch (e) {
if (e instanceof Error && /is not supported/.test(e.message)) {
return httpClient.get(url, { responseType: "text" });
}
throw e;
} Prevention
- Never set responseType to blob/document/json for SignalR requests.
- Build a typed wrapper that constrains responseType to text|arraybuffer.
- Document which responseType values the client supports in your wrapper.
When it happens
Trigger: A caller sets request.responseType to 'blob', 'document', or 'json' on an HttpRequest passed to FetchHttpClient (or to the default HttpClient.send). This is almost always user error: SignalR's transports only ever request text or arraybuffer.
Common situations: Custom HttpClient wrapper or a user that manually drives httpClient.get/post with responseType set for their own use. Misconfiguration copied from a generic fetch tutorial.
Related errors
- No method defined.
- No url defined.
- A valid url is required.
- assembly must be defined when using a descriptor.
- Authentication refreshBeforeExpirationInMilliseconds must…
AI-assisted analysis of dotnet/aspnetcore@3600ca084e (2026-08-11).
Data as JSON: /api/errors/16450a083f6b374e.
Report an issue: GitHub.
Appendix: source
Thrown at src/SignalR/clients/ts/signalr/src/FetchHttpClient.ts:178
this._jar.getCookies(url, (e, c) => cookies = c.join("; "));
}
return cookies;
}
}
function deserializeContent(response: Response, responseType?: XMLHttpRequestResponseType): Promise<string | ArrayBuffer> {
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;
}
View on GitHub (pinned to 3600ca084e)