fix: enforce fresh Alta error boundaries

This commit is contained in:
2026-08-19 22:10:01 +00:00
parent 08498653eb
commit 582fc46914
2 changed files with 52 additions and 5 deletions
+1 -5
View File
@@ -98,15 +98,11 @@ function enforceResponseSize(data, headers, maxBytes) {
}
function safeTransportError(operation, error, cookie) {
if (error && typeof error === 'object' && typeof error.code === 'string' && error.code.startsWith('ALTA_')) {
return error;
}
const formatted = formatAltaError(operation, error, { secrets: [cookie, `va=${cookie}`] });
const safe = altaError(formatted.code, formatted.message, {
return altaError(formatted.code, formatted.message, {
status: formatted.status,
timeout: formatted.timeout,
});
return safe;
}
class AltaClient {