{"record":{"id":"d96bc7d52d985c2b","repo":"apereo/cas","slug":"failed-to-load-configuration-metadata-response","errorCode":null,"errorMessage":"Failed to load configuration metadata: ${response.status}","messagePattern":"Failed to load configuration metadata: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"support/cas-server-support-thymeleaf/src/main/resources/static/js/palantir-cas-config.js","lineNumber":528,"sourceCode":"                        propertyName: propertyName,\n                        propertyValue: value,\n                        propertySource: source.name\n                    });\n                }\n            }\n        }\n    }\n    configurationTable.search(\"\").draw();\n    mutableConfigurationTable.search(\"\").draw();\n}\n\nasync function loadConfigurationMetadata() {\n    if (!CasActuatorEndpoints.configurationMetadata() || CAS_CONFIG_METADATA.length === 0) {\n        return;\n    }\n    const response = await fetch(CasActuatorEndpoints.configurationMetadata());\n    if (!response.ok) {\n        throw new Error(`Failed to load configuration metadata: ${response.status}`);\n    }\n\n    CAS_CONFIG_METADATA = Object.values(await response.json());\n}\n\nasync function populateConfigurationNameSelectOptions() {\n    const nameElem = $(\"#newConfigPropertyName\")[0];\n    const ts = nameElem.tomselect;\n    const currentValue = ts.getValue();\n    const entries = [...new Map(\n        CAS_CONFIG_METADATA\n            .filter(entry => entry.id)\n            .map(entry => [\n                entry.id,\n                {\n                    id: entry.id,\n                    name: entry.id,\n                    type: entry.type,","sourceCodeStart":510,"sourceCodeEnd":546,"githubUrl":"https://github.com/apereo/cas/blob/e7288fc434b4f4505b8452e1a57e8fb3111bb863/support/cas-server-support-thymeleaf/src/main/resources/static/js/palantir-cas-config.js#L510-L546","documentation":"loadConfigurationMetadata() fetches the CAS actuator configuration-metadata endpoint and throws if the HTTP response is not OK, embedding the numeric status in the message. It surfaces endpoint failures (401/403/404/5xx) to the configuration-operations UI.","triggerScenarios":"initializeConfigurationOperations -> loadConfigurationMetadata when the actuator endpoint returns non-2xx: endpoint not exposed, unauthenticated request (401/403), wrong URL (404), or server error (5xx).","commonSituations":"configurationMetadata actuator endpoint not enabled/exposed in management endpoint config, security blocking actuator access, CAS server not fully started, wrong base URL in CasActuatorEndpoints.","solutions":["Expose the configuration-metadata actuator endpoint in CAS management endpoint configuration","Ensure the browser user is authenticated/authorized for actuator endpoints","Interpret the status in the message: 404 = endpoint disabled or wrong URL; 401/403 = permissions; 5xx = check CAS server logs","Verify CasActuatorEndpoints.configurationMetadata() resolves to the correct CAS base URL"],"exampleFix":"// before\nthrow new Error(`Failed to load configuration metadata: ${response.status}`);\n// after\nif (!response.ok) {\n    console.warn(`Configuration metadata unavailable (HTTP ${response.status}); using local fallback`);\n    return;\n}","handlingStrategy":"try-catch","validationCode":"const url = CasActuatorEndpoints.configurationMetadata();\nif (!url) return; // endpoint not configured/enabled\nconst resp = await fetch(url, { credentials: 'include' });\nconst healthy = resp.ok;","typeGuard":"const hasMetadataEndpoint = () => typeof CasActuatorEndpoints.configurationMetadata === 'function' && !!CasActuatorEndpoints.configurationMetadata();","tryCatchPattern":"try { await loadConfigurationMetadata(); } catch (e) { if (/Failed to load configuration metadata/.test(e.message)) { renderMetadataUnavailable(e.message); } else { throw e; } }","preventionTips":["Expose the configuration-metadata actuator endpoint in CAS properties","Ensure actuator endpoints are reachable with the user's credentials","Check HTTP status returned before parsing the response"],"tags":["javascript","http","actuator"],"backgroundTag":"http-error-response","analyzedSha":"e7288fc434b4f4505b8452e1a57e8fb3111bb863","analyzedAt":"2026-09-08T15:39:16.015Z","contentChangedAt":"2026-09-08T15:39:16.015Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}