isAccessDenied function

bool isAccessDenied(
  1. Object error
)

Whether error is the database refusing the caller: Postgres' insufficient_privilege (42501), raised by an RLS policy or by a SECURITY DEFINER RPC's role check (migrations 077, 079). Retrying cannot help, so it must not be shown as "please try again".

Implementation

bool isAccessDenied(Object error) =>
    error is PostgrestException && error.code == '42501';