Skip to content

Commit 537dbf0

Browse files
committed
error
1 parent dadd3ea commit 537dbf0

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/commands/secrets.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,19 +102,24 @@ export default function Secrets({ scanType = 'all', include = [], exclude = [],
102102
}
103103

104104
// Handle bypass selection
105-
function handleBypassSelect(reason) {
105+
async function handleBypassSelect(reason) {
106106
if (reason === 'cancel') {
107107
reportBlockAndExit();
108108
return;
109109
}
110110
const remote = getRemoteBody();
111111
if (remote) {
112-
fetchApi('/extension/push-protection/bypass', 'POST', {
113-
...remote,
114-
secrets: buildSecretsPayload(),
115-
reason: reason.startsWith('other:') ? 'other' : reason,
116-
custom_reason: reason.startsWith('other:') ? reason.slice(6) : undefined,
117-
}).catch(() => {});
112+
try {
113+
await fetchApi('/extension/push-protection/bypass', 'POST', {
114+
...remote,
115+
secrets: buildSecretsPayload(),
116+
reason: reason.startsWith('other:') ? 'other' : reason,
117+
custom_reason: reason.startsWith('other:') ? reason.slice(6) : undefined,
118+
});
119+
} catch {
120+
reportBlockAndExit();
121+
return;
122+
}
118123
}
119124
setTimeout(() => exit(), 100);
120125
}

0 commit comments

Comments
 (0)