File tree Expand file tree Collapse file tree
api/(server)/ee/permissionSyncStatus Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export function PermissionSyncBanner() {
2121 return data . hasPendingFirstSync ;
2222 } ,
2323 refetchInterval : ( query ) => {
24- const hasPendingFirstSync = query . state . data ;
24+ const hasPendingFirstSync = query . state . data ?. hasPendingFirstSync ;
2525 // Keep polling while sync is in progress, stop when done
2626 return hasPendingFirstSync ? POLL_INTERVAL_MS : false ;
2727 } ,
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export const GET = apiHandler(async () => {
2222 if ( ! entitlements . includes ( 'permission-syncing' ) ) {
2323 return serviceErrorResponse ( {
2424 statusCode : StatusCodes . FORBIDDEN ,
25- errorCode : ErrorCode . NOT_FOUND ,
25+ errorCode : ErrorCode . INSUFFICIENT_PERMISSIONS ,
2626 message : "Permission syncing is not enabled for your license" ,
2727 } ) ;
2828 }
You can’t perform that action at this time.
0 commit comments