Gravity
Search…
⌃K
Gravity
Search…
⌃K
Welcome to Gravity
Getting Started
Stack
Updates
Gravity Server
Introduction
Installation
Application Structure
REST API
Authentication
Config
Environment Variables
Database Queries
Handling Errors
Logging
Push Notifications
Email Notifications
User Feedback
Permissions (Roles)
File Uploads
Payments
Free Accounts
CLI Toolbelt
Testing
Gravity Web
Introduction
Tailwind & SCSS
Routing
Events
Authentication
Hooks
Components
Views
Handling Errors
Deployment
Gravity Native
Introduction
Prerequisites
Installation
App Context
Authentication
Magic Links
Handling Errors
Navigation
Config
Events
Views
Components
Push Notifications
Payments
Building Your App
Mission Control
Introduction
Installation
User Management
Feedback
Events
Logs
Powered By GitBook

Handling Errors

There is a global error handler contained within the AppContext. If you encounter an error in your application you can handle it by calling the handleError method.
context.handleError(err)
When an error is caught, it will be displayed to the user in a notification banner and the mobile device will vibrate.
In the case of a 401 (unauthenticated) error, the user will be directed to sign in.
Gravity Native - Previous
Magic Links
Next - Gravity Native
Navigation
Last modified 2mo ago
Copy link