fix: a handled "O pedido mudou" no longer reaches Sentry (DTF-WEB-7, DTF-WEB-K), and the 90-day chart is readable on a phone
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 7m35s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 59s
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 7m35s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 59s
saveFinalFiles and pullMove answer a stale-version 409 by reloading and trying once more, but api() had already reported it. The first call now expects the 409; one they cannot answer is still reported (reportRefusal), and any other status is reported by api() as before, once. Past a month the chart's gap is 1 px (90 bars were under 1 px each on a 375 px phone), and the last date ends at the chart's edge instead of being cut. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -265,6 +265,13 @@ async function api(path,body,options={}){
|
||||
}
|
||||
return d;
|
||||
}
|
||||
// A 409 a caller expected (api's options.expected: [409]) and then could not
|
||||
// answer is still reported, as api() would have; any other status api()
|
||||
// already reported. Returns the error to rethrow.
|
||||
function reportRefusal(path,error){
|
||||
if(error?.status===409)window.dtfObservability?.apiError?.(path,error.status,error.message);
|
||||
return error;
|
||||
}
|
||||
function download(uid,orderId){return async()=>{
|
||||
const result=await api('/uploads/'+uid+'/download'+(orderId?'?order_id='+encodeURIComponent(orderId):''));
|
||||
const link=node('a');link.href=result.url;link.referrerPolicy='no-referrer';link.download=result.name;link.click();
|
||||
|
||||
Reference in New Issue
Block a user