dotnet/orleans · warning · Error
${url} failed with ${response.status}
Error message
${url} failed with ${response.status} What it means
A browser-side Error thrown by the generic post() helper in the DurableJobsJournaling web frontend when any POST (e.g., /api/load/start) returns a non-2xx status. The helper builds fetch options, checks response.ok, and throws a templated message including the URL and status code so the failure is identifiable. The throw propagates to the caller, which is expected to handle it.
Source
Thrown at playground/DurableJobsJournaling/DurableJobsJournaling.Web/wwwroot/index.html:104
<section class="card" style="margin-top:16px">
<h2>Recent workflows</h2>
<table><thead><tr><th>Workflow</th><th>Status</th><th>Latency ms</th><th>Retries</th><th>Failures</th><th>Error</th></tr></thead><tbody id="recent"></tbody></table>
</section>
<script>
let controlsInitialized = false;
async function post(url, body) {
const options = { method: 'POST' };
if (body !== undefined) {
options.headers = { 'content-type': 'application/json' };
options.body = JSON.stringify(body);
}
const response = await fetch(url, options);
if (!response.ok) {
throw new Error(`${url} failed with ${response.status}`);
}
await refresh();
}
async function saveSettings() {
const response = await fetch('/api/load', {
method: 'PUT',
headers: { 'content-type': 'application/json' },
body: JSON.stringify(settings())
});
if (!response.ok) {
throw new Error(`/api/load failed with ${response.status}`);
}
applySettings(await response.json());
await refresh();
}View on GitHub (pinned to fca799fa70)
Solutions
- Read the status code embedded in the error message to classify the failure (4xx = client/validation, 5xx = server).
- Inspect the server logs / response body for the POST URL named in the message.
- Wrap post() calls in try/catch at the call site to give the user feedback instead of an unhandled rejection.
Example fix
// before
const response = await fetch(url, options);
if (!response.ok) {
throw new Error(`${url} failed with ${response.status}`);
}
// after (include body for diagnosis)
const response = await fetch(url, options);
if (!response.ok) {
const detail = await response.text().catch(() => "<no body>");
throw new Error(`${url} failed with ${response.status}: ${detail}`);
} Defensive patterns
Strategy: try-catch
Try / catch
async function safePost(url, body) {
try {
const response = await post(url, body);
} catch (err) {
console.error(err);
showErrorToUser(`Could not perform ${url}: ${err.message}`);
}
} Prevention
- Wrap post() calls at the call site so failures become user-facing feedback, not unhandled rejections.
- Include the URL and status in the error (already done) for fast triage.
- Add retry with backoff for transient 5xx failures.
When it happens
Trigger: Any UI action that calls post(url, body) — starting/stopping load, triggering jobs — and the server returns an error status. The post() helper does not catch, so an unhandled rejection surfaces in the console unless the caller wraps it.
Common situations: The load-generation grain threw an exception, the journaling backend is unhealthy, or a request body failed server-side validation. The status code in the message indicates which.
Related errors
- HTTP error! status: ${response.status}
- Network response was not ok
- /api/load failed with ${response.status}
- One or more errors occurred.
- Unable to create or connect to the Azure table in {StoragePo
AI-assisted analysis of dotnet/orleans@fca799fa70 (2026-08-13).
Data as JSON: /api/errors/0aaf188ea7ff0a43.
Report an issue: GitHub.