Complete reference for Truv Bridge JavaScript callbacks, onEvent types, event data payloads, and error codes
Truv Bridge emits client-side events during the user’s connection flow. These are JavaScript callbacks configured when you initialize TruvBridge.init(). They are distinct from server-side webhook events.
Callbacks: Responses for specific Truv Bridge actions
Event data: onEvent types and their payload shapes
{ "error": { "error_code": "LOGIN_ERROR", "error_message": "Username or password is incorrect", "error_type": "LINK_ERROR" }}
Design your UX to surface login errors to borrowers in real time. When onEvent fires with type ERROR and error_code: LOGIN_ERROR, prompt the user to re-enter their credentials rather than silently failing.
When Bridge encounters an error, intercept it client-side and route the user to a manual verification workflow instead of dead-ending the experience.
Detect the error. Register an onEvent callback when initializing Truv Bridge. When onEvent fires with type ERROR, inspect the error_code in the payload.
Close Bridge. After capturing the error details, close the Bridge widget programmatically or wait for the user to close it via onClose.
Route to fallback. Based on the error type, redirect the user to your manual process — document upload, paper form submission, or a support contact flow.
error_code
Meaning
Recommended fallback
LOGIN_ERROR
Incorrect credentials
Prompt the user to retry. After repeated failures, offer document upload.
MFA_ERROR
Invalid MFA input
Prompt the user to retry. After repeated failures, offer document upload.
UNAVAILABLE
Payroll provider is unreachable
Route directly to document upload or manual process. The provider outage is not user-fixable.
NO_DATA
Account has no data
Route to document upload. The connected account lacks the required records.
ERROR
Generic error
Log the task_id for debugging. Offer document upload as a fallback.
Track which error_code values trigger manual fallbacks in your analytics. A high rate of UNAVAILABLE errors for a specific provider may indicate a temporary outage, while frequent LOGIN_ERROR events may point to a UX issue in your credential entry flow.
Bridge errors are client-side events, distinct from server-side webhook events and task status changes. Use both in combination: Bridge onEvent for real-time UX routing, and webhooks for backend workflow orchestration.