Skip to content

Commit 549c23e

Browse files
committed
fix: handle errors encountered during init
The initial fetch for the loader and subsequent initialization don't properly handle errors, which could result in silent failures. This fix adds proper error handling to surface these failutes to the user.
1 parent 6eed2b4 commit 549c23e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/app/Flash.jsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,12 @@ export default function Flash() {
209209
})
210210

211211
// Initialize the manager
212-
qdlManager.current.initialize(imageManager.current)
213-
});
212+
return qdlManager.current.initialize(imageManager.current)
213+
})
214+
.catch((err) => {
215+
console.error('Error initializing QDL manager:', err)
216+
setError(ErrorCode.UNKNOWN)
217+
})
214218
}, [config, imageManager.current])
215219

216220
// Handle user clicking the start button

0 commit comments

Comments
 (0)