Skip to content
Discussion options

You must be logged in to vote

Not really a bug in the sense of "broken code," it's an intentional (if incomplete) workaround, and the WordPress team has openly flagged it as a known limitation right in the source comments.

The getEntityRecord resolver (singular) has had this exact pattern for years:

} catch ( error ) {
    // We need a way to handle and access REST API errors in state
    // Until then, catching the error ensures the resolver is marked as resolved.
} finally {
    dispatch.__unstableReleaseStoreLock( lock );
}

getEntityRecords (plural, what you're using) didn't originally have this catch at all, which actually caused a worse problem: if the REST call failed, the resolver would throw, and isResolving() /

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@chrono-meter
Comment options

Answer selected by chrono-meter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants