fix: a quote this session no longer owns sends the customer back to the cart, not to an error (DTF-WEB-1Y)
All checks were successful
Build and deploy / Validate source (push) Successful in 11s
Build and deploy / Integration suite on a real stack (push) Successful in 8m18s
Build and deploy / Secret scan and release gate (push) Successful in 12s
Build and deploy / Publish images (push) Successful in 2m2s
All checks were successful
Build and deploy / Validate source (push) Successful in 11s
Build and deploy / Integration suite on a real stack (push) Successful in 8m18s
Build and deploy / Secret scan and release gate (push) Successful in 12s
Build and deploy / Publish images (push) Successful in 2m2s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -573,7 +573,7 @@
|
||||
if (naPagina() && !actions.children.length) esqueletoPagamento();
|
||||
try {
|
||||
await ready;
|
||||
const quote=await api('/quotes/'+shownId);
|
||||
const quote=await api('/quotes/'+shownId,undefined,{expected:[404]});
|
||||
if(version!==refreshVersion || draftId!==shownId) return;
|
||||
// Asked to pay a cart identical to one already paid (the same test
|
||||
// repeated): that is a new order, never the paid one shown again. The
|
||||
@@ -628,6 +628,15 @@
|
||||
}
|
||||
} catch(error) {
|
||||
if(version!==refreshVersion || draftId!==shownId) return;
|
||||
// The quote this browser remembers is not this session's any more (the
|
||||
// session changed, or it is gone): an old reference, not an error
|
||||
// (Sentry DTF-WEB-1Y). The cart is still here to send again.
|
||||
if(error.status===404){
|
||||
clearDraft();
|
||||
message('Este pagamento não está mais disponível nesta sessão. Seu carrinho continua aqui: envie de novo para pagar.','warn');
|
||||
button('Voltar ao carrinho',()=>vaiPara(CARRINHO));
|
||||
return;
|
||||
}
|
||||
message(error.message,'error');
|
||||
actions.replaceChildren();
|
||||
button('Limpar referência e tentar de novo',clearDraft);
|
||||
|
||||
Reference in New Issue
Block a user