Skip to content

Commit c481311

Browse files
committed
fix: use actionCompleted for errors
1 parent 9900494 commit c481311

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

injected/src/features/autofill-import.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { isBeingFramed, withRetry } from '../utils';
22
import { ActionExecutorBase } from './broker-protection';
3+
import { ErrorResponse } from './broker-protection/types';
34

45
export const ANIMATION_DURATION_MS = 1000;
56
export const ANIMATION_ITERATIONS = Infinity;
@@ -599,7 +600,12 @@ export default class AutofillImport extends ActionExecutorBase {
599600
window.location.href = downloadURL;
600601
} else {
601602
// If there's no user id or export id, we post an action failed message
602-
this.postBookmarkImportMessage('actionFailed', { error: 'No user id or export id found' });
603+
this.postBookmarkImportMessage('actionCompleted', {
604+
result: new ErrorResponse({
605+
actionID: 'download-data',
606+
message: 'No user id or export id found',
607+
}),
608+
});
603609
}
604610
}
605611

0 commit comments

Comments
 (0)