omc-core 0.4.33 → 0.4.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cloudpivot-auth.js +8 -0
- package/package.json +1 -1
package/dist/cloudpivot-auth.js
CHANGED
|
@@ -252,6 +252,14 @@ export function fetchCloudPivotHttp(baseUrl, signal, fetchImpl = fetch, tenantHe
|
|
|
252
252
|
parsed = JSON.parse(text);
|
|
253
253
|
}
|
|
254
254
|
catch {
|
|
255
|
+
// r33: a 404 HTML page from nginx means the deployment lacks the
|
|
256
|
+
// module behind this path (e.g. local without the dashboard service) —
|
|
257
|
+
// an environment-capability fact, not a payload defect. Surface the
|
|
258
|
+
// HTTP status + content type so the caller can tell them apart.
|
|
259
|
+
const contentType = response.headers.get("content-type") ?? "unknown";
|
|
260
|
+
if (!response.ok && !contentType.includes("json")) {
|
|
261
|
+
throw new CloudPivotAuthenticationError(`CloudPivot ${input.path} → HTTP ${response.status}(${contentType.split(";")[0]}):该端点在此环境不可达(模块未部署/网关未路由),属环境能力缺失,非载荷错误——改走环境探测(doctor/readiness)确认面可用性,勿重试同一载荷。`);
|
|
262
|
+
}
|
|
255
263
|
throw new CloudPivotAuthenticationError(`CloudPivot returned non-JSON data for ${input.path}.`);
|
|
256
264
|
}
|
|
257
265
|
return { status: response.status, body: parsed };
|