Deprecation Notice
Standardized Error Format
bundle.social uses a standardized error format across all social platforms, finally. When an error occurs during post creation, scheduling, or publishing, you’ll receive detailed error information in theerrorsVerbose field.
The errorsVerbose field is an object where each key is a platform name (e.g., INSTAGRAM, TIKTOK, FACEBOOK) and each value is a standardized error object (or null if no error occurred for that platform).
Error Schema
Each platform’s standardized error object contains the following fields:Field Descriptions
-
code: A stable, stringified error code that identifies the specific error type. The code follows a pattern ofPLATFORM:ERROR_CODE(e.g.,IG:190for Instagram error 190,HTTP:429for rate limit). This code remains consistent and can be used programmatically to handle specific error cases. -
errorMessage: The raw error message returned by the social media platform’s API. This is intended for developers and may contain technical details about what went wrong. -
isTransient: A boolean flag indicating whether the error is temporary. Iftrue, the operation can be retried after a delay (often indicated in themetafield). Iffalse, the error requires manual intervention or configuration changes. -
httpStatus: The HTTP status code from the platform’s API response, if available. Common codes include429(rate limit),401(authentication error),403(permission denied), and5xx(server errors). -
meta: Additional metadata and debugging information specific to each platform. This may include:- Trace IDs for support requests
- Rate limit reset timestamps
- Error subcodes
- Validation details
- Retry-after headers
- Platform-specific error context
-
userFacingMessage: A user-friendly error message suitable for displaying to end users. This message is crafted to be understandable without technical knowledge and provides actionable guidance when possible.
How Error Handling Works
bundle.social automatically captures and processes errors from all supported social media platforms. When an error occurs:- Error Capture: The raw error from the platform API is intercepted
- Error Parsing: The error is parsed and normalized into our standardized format
- Error Classification: The error is classified as transient or non-transient
- Error Enrichment: Additional context and debugging information is added
- Error Return: The standardized error is returned in the
errorsVerbosefield
Platform-Specific Error Codes
Each platform has its own error code prefix:| Platform | Prefix | Example |
|---|---|---|
META | META:190 | |
| Threads | META | META:190 |
META | META:190:463 | |
| TikTok | TT | TT:40001 |
| Twitter/X | TW | TW:429 |
LI | LI:401 | |
| YouTube | YT | YT:403 |
| Google Business | GB | GB:403 |
PIN | PIN:429 | |
RD | RD:RATELIMIT | |
| Discord | DI | DI:DAPI_50035 |
| Slack | SL | SL:rate_limited |
| Bluesky | BSKY | BSKY:429 |
| Mastodon | MST | MST:429 |
| HTTP | HTTP | HTTP:502 |
| Network | NET | NET:ETIMEDOUT |
Error Types
Transient Errors
Transient errors are temporary and can usually be resolved by retrying the operation after a delay. Common transient errors include:- Rate Limits (
isTransient: true): The platform’s rate limit has been exceeded. Check themetafield forretry_afterinformation. - Server Errors (
isTransient: true): The platform’s API is experiencing temporary issues (HTTP 5xx errors). - Network Errors (
isTransient: true): Connection timeouts or network-related issues.
Non-Transient Errors
Non-transient errors require manual intervention and cannot be resolved by retrying. Common non-transient errors include:- Authentication Errors (
isTransient: false): Invalid or expired access tokens. The user needs to reconnect their social account. - Permission Errors (
isTransient: false): Insufficient permissions to perform the operation. The user needs to grant additional permissions. - Validation Errors (
isTransient: false): Invalid post content (e.g., text too long, unsupported media format). The post needs to be modified. - Quota Exceeded (
isTransient: false): Platform-specific quotas have been reached (e.g., daily post limit).
Migration Guide
Before (will be deprecated)
After
Best Practices
-
Check
isTransient: Always check theisTransientflag to determine if retrying is appropriate. -
Use Error Codes: Use the
codefield to programmatically handle specific error types rather than parsing error messages. -
Display User Messages: Show
userFacingMessageto end users and logerrorMessagefor debugging. -
Handle Rate Limits: When encountering rate limits, respect the
retry_aftervalue in themetafield. -
Log Metadata: Include the
metafield in your logs to help with debugging and support requests. - Monitor Error Patterns: Track error codes and types to identify recurring issues with specific platforms or accounts.
Support
If you encounter errors that are not clearly documented or need assistance with error handling, please contact us. When reporting issues, include:- The error
code - The
errorMessage - The
metafield contents - The platform and post ID