🎨 Add comment about intentional error handling

This commit is contained in:
Philipp Stracker 2025-02-07 12:07:52 +01:00
parent 35716db65a
commit c2c9e4009f
No known key found for this signature in database

View file

@ -75,15 +75,14 @@ export const setIsReady = ( isReady ) => setTransient( 'isReady', isReady );
*/
export function persist() {
return async ( { select } ) => {
const data = select.persistentData();
try {
await apiFetch( {
path: REST_PERSIST_PATH,
method: 'POST',
data,
data: select.persistentData(),
} );
} catch ( e ) {
// We catch errors here, as the onboarding module is not handled by the persistAll hook.
console.error( 'Error saving progress.', e );
}
};