{"record":{"id":"3434779fc3d409cb","repo":"OrchardCMS/OrchardCore","slug":"responsetype-is-not-supported","errorCode":null,"errorMessage":"${responseType} is not supported.","messagePattern":"(.+?) is not supported\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/OrchardCore.Modules/OrchardCore.SignalR/wwwroot/Scripts/signalr.js","lineNumber":704,"sourceCode":"            // @ts-ignore: unused variable\n            this._jar.getCookies(url, (e, c) => cookies = c.join(\"; \"));\n        }\n        return cookies;\n    }\n}\nfunction deserializeContent(response, responseType) {\n    let content;\n    switch (responseType) {\n        case \"arraybuffer\":\n            content = response.arrayBuffer();\n            break;\n        case \"text\":\n            content = response.text();\n            break;\n        case \"blob\":\n        case \"document\":\n        case \"json\":\n            throw new Error(`${responseType} is not supported.`);\n        default:\n            content = response.text();\n            break;\n    }\n    return content;\n}\n\n;// CONCATENATED MODULE: ./src/XhrHttpClient.ts\n// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n\n\n\n\nclass XhrHttpClient extends HttpClient {\n    constructor(logger) {\n        super();\n        this._logger = logger;","sourceCodeStart":686,"sourceCodeEnd":722,"githubUrl":"https://github.com/OrchardCMS/OrchardCore/blob/4306c0717fe573f6fca1b4955909ddab6a192807/src/OrchardCore.Modules/OrchardCore.SignalR/wwwroot/Scripts/signalr.js#L686-L722","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","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"],"exampleFix":"// before\nconst request = new HttpRequest('POST', url, body, { responseType: 'json' }); // browser: throws\n// after\nconst request = new HttpRequest('POST', url, body, { responseType: 'text' });\nconst data = JSON.parse(await httpClient.send(request).then(r => r.content));","handlingStrategy":"validation","validationCode":"const allowed = ['text','arraybuffer']; if (request.responseType && !allowed.includes(request.responseType) && isBrowser) throw new Error('Unsupported responseType in browser');","typeGuard":"const isBrowserSafeResponseType = (t) => t === undefined || t === 'text' || t === 'arraybuffer';","tryCatchPattern":"try { await client.send(request); } catch (e) { if (/is not supported/.test(e.message)) { request.responseType = 'text'; await client.send(request); } }","preventionTips":["Use only 'text' or 'arraybuffer' in browser code","Parse JSON manually from text responses","Keep browser and Node transports separate"],"tags":["browser","unsupported","http","signalr"],"backgroundTag":"unsupported-operation","analyzedSha":"4306c0717fe573f6fca1b4955909ddab6a192807","analyzedAt":"2026-09-13T17:41:05.024Z","contentChangedAt":"2026-09-13T17:41:05.024Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}