♻️ Remove error handling from persist actions

This commit is contained in:
Philipp Stracker 2025-02-07 12:07:12 +01:00
parent 540be69cc9
commit 9c1e6f3b27
No known key found for this signature in database
7 changed files with 27 additions and 60 deletions

View file

@ -77,16 +77,10 @@ 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,
} );
} catch ( e ) {
console.error( 'Error saving progress.', e );
}
await apiFetch( {
path: REST_PERSIST_PATH,
method: 'POST',
data: select.persistentData(),
} );
};
}