feat: every error shown in red reaches Sentry, also the ones the page handled itself
Some checks failed
Build and deploy / Validate source (push) Successful in 6s
Build and deploy / Publish images (push) Has been cancelled
Build and deploy / Secret scan and release gate (push) Has been cancelled
Build and deploy / Integration suite on a real stack (push) Has been cancelled
Some checks failed
Build and deploy / Validate source (push) Successful in 6s
Build and deploy / Publish images (push) Has been cancelled
Build and deploy / Secret scan and release gate (push) Has been cancelled
Build and deploy / Integration suite on a real stack (push) Has been cancelled
Until now only failed API calls and uncaught exceptions reached Sentry. An error the page caught and showed, like the folders' "A última tentativa falhou" Marcus photographed on 16/11, or an upload that failed on the Site, never did. Now every red message in the Kanban, the Site's checkout, the customer's account page and every failed upload is sent, one issue per kind of message; the same text an API error already sent, or a 401 / restart 503 it skips on purpose, is not sent twice. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -152,7 +152,10 @@
|
||||
// One message line under the steps. Its tone says what it is: a refusal or
|
||||
// a missing field is an error (red), a cart that changed a warning, a
|
||||
// created order a confirmation, the rest information.
|
||||
function message(text, tone='info') { status.textContent = text; status.dataset.tone = text ? tone : ''; }
|
||||
function message(text, tone='info') {
|
||||
status.textContent = text; status.dataset.tone = text ? tone : '';
|
||||
if (tone === 'error' && text) window.dtfObservability?.uiError?.(text, 'site');
|
||||
}
|
||||
function button(label, handler, into = actions, className = 'pagBtn') {
|
||||
const el = document.createElement('button');
|
||||
el.type = 'button';
|
||||
@@ -248,7 +251,8 @@
|
||||
onBytes:n=>{e.sent=n;pintaEnvio();}});
|
||||
})();
|
||||
e.promise.then(()=>{e.done=true;if(window.dtfTimings)T.uploadEnd=performance.now();falhas.delete(k);pintaEnvio();},
|
||||
error=>{envios.delete(k);if(error?.name!=='AbortError')falhas.set(k,{file,error});pintaEnvio();});
|
||||
error=>{envios.delete(k);if(error?.name!=='AbortError'){falhas.set(k,{file,error});
|
||||
window.dtfObservability?.uiError?.('Envio de arquivo falhou: '+(error?.message||'erro no envio'),'site');}pintaEnvio();});
|
||||
envios.set(k,e);
|
||||
}
|
||||
return e.promise;
|
||||
|
||||
Reference in New Issue
Block a user