@meniga/core
v6.1.36-alpha.0
Published
The core meniga request package
Downloads
556
Readme
@meniga/core
Core is a library for handling requests and error handling:
Exports for core work
coreConstants
A set of constants used in the core library
Exports for API requests
Request
A wrapper for Axios.get, Axios.put, Axios.delete and Axios.post
clearAllRequestTimers
Each request has a timer that triggers an event called slowApi if a request takes more than X seconds (configurable). You can call clearAllRequestTimers to force clear all the timers.
auth
Helper utility to save/remove auth token from storage
idle
Helper utilities to track idle time from the user and to show a logout warning if the user has been idle for a set time
Exports for error handling
trackSentryError, setSentryUser, clearSentryUser, sendSentryMessage
Helpers to log errors to sentry.io
ErrorBoundary
A react component that traps errors in the app and logs them in sentry.io