diff --git a/studio/agent.js b/studio/agent.js index 971f8cb..29d35d5 100644 --- a/studio/agent.js +++ b/studio/agent.js @@ -91,8 +91,13 @@ var m = t; try { var x = JSON.parse(t); m = (x.error && (x.error.message || x.error)) || x.message || x.detail || t; } catch (e) { /* plain text */ } if (typeof m !== "string") m = JSON.stringify(m); - m = m.replace(/<[^>]+>/g, " ").replace(/\s+/g, " ").trim(); - var hint = r.status === 401 || r.status === 403 ? " Check the API key (⚙)." : r.status === 404 ? " Check the endpoint: most servers want the URL ending in /v1." : ""; + if (/^\s*