Fix error handling with Gatekeeper component.