fix: enforce fresh Alta error boundaries
This commit is contained in:
+1
-5
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user