On a custom Aura component, I have defined an sobject attribute as
<aura:attribute name="localVatInst" type="CustomObject__c" default="{'sobjectType':'CustomObject__c'}" />
If user does not have access to it, they see an error like
Invalid definition for CustomObject__c: Access to entity 'CustomObject__c' denied
How do I check the user has access to this object? I see that even the init is not called yet.
EDIT: I KNOW the user does not have access to the object. As multiple users will be using this component, I wanted to put a check.