gitlabEdit

๐Ÿ”งSDK Troubleshooting

This guide helps you resolve common issues when using the Docs-Dispatcher SDKs (Node.js, PHP, Java).

Authentication Errors

Invalid Token (401 Unauthorized)

Symptoms:

Status code: 401
Response: {"error": "Unauthorized", "message": "Invalid token"}

Causes:

  1. Token is incorrect or malformed

  2. Token has expired

  3. Token was revoked or deleted

  4. Using wrong authentication method (Bearer vs Basic)

Solutions:

Node.js:

// Verify you're using the correct token
import DocsDispatcher, { BearerAuth } from 'docs-dispatcher-sdk'
import axios from 'axios'

const auth = new BearerAuth('your-valid-jwt-token') // Check token value
const http = new DocsDispatcher.Http.AxiosAdapter(axios)
const dd = new DocsDispatcher(auth, http)

// Test authentication
try {
  await dd.healthCheck()
  console.log('Authentication successful')
} catch (error) {
  console.error('Auth failed:', error.message)
}

PHP:

Java:

Get a New Token:

  1. Navigate to Settings โ†’ API Tokens

  2. Generate a new token

  3. Update your environment variables

Expired Token

Symptoms:

Solution: Tokens have a validity period. Generate a new token from your dashboard and update your configuration.

Missing Authentication

Symptoms:

Solution: Ensure you've configured authentication before making API calls.

Node.js:

PHP:

Java:

Validation Errors

Missing Required Parameters (400 Bad Request)

Symptoms:

Causes:

  1. Missing required fields

  2. Invalid field types

  3. Empty or null values for required parameters

Solutions:

Node.js (use built-in validation):

PHP:

Java:

Invalid Data Types

Symptoms:

Solution: Ensure you're using the correct data types.

Node.js:

PHP:

Java:

Template Not Found (404 Not Found)

Symptoms:

Causes:

  1. Template name is misspelled

  2. Template doesn't exist in your account

  3. Template was deleted

Solutions:

  1. Verify template name in Templater UIarrow-up-right

  2. Check for typos in template name

  3. Ensure template is published (not draft)

Node.js:

PHP:

Java:

Network and Connection Issues

Connection Timeout

Symptoms:

Causes:

  1. Network connectivity issues

  2. Firewall blocking outbound requests

  3. API endpoint is down

Solutions:

Node.js (increase timeout):

PHP (configure Guzzle timeout):

Java (configure OkHttp timeout):

Check API Status: Visit status.docs-dispatcher.ioarrow-up-right to verify API availability.

SSL/TLS Certificate Errors

Symptoms:

Causes:

  1. Corporate proxy with SSL inspection

  2. Outdated CA certificates

  3. Network security policies

Solutions:

Node.js (not recommended for production):

Better Solution: Update CA certificates:

Rate Limiting (429 Too Many Requests)

Symptoms:

Solutions:

Implement Retry Logic:

Node.js:

PHP:

Installation Problems

Package Manager Errors

Node.js - Yarn/npm Issues:

PHP - Composer Issues:

Java - Maven Issues:

Java - Gradle Issues:

Version Compatibility Issues

Node.js:

PHP: Check PHP version:

Java: Check Java version:

Common Mistakes

Wrong Service Enum

Java:

Missing Config for Provider

Symptoms:

Solution: Configure the provider in your dashboardarrow-up-right before using it.

  1. Navigate to Admin โ†’ Configurations

  2. Select the provider (e.g., iPaidThat, Qonto, SMS Factor)

  3. Add API credentials

  4. Save and test configuration

Incorrect Response Format

Symptoms:

Cause: Requesting JSON format but API returns binary (PDF).

Solution:

Node.js:

PHP:

Java:

Debug Logging

Enable detailed logging to diagnose issues:

Node.js

PHP

Java

Environment-Specific Issues

Development vs Production

Use Environment Variables:

Node.js (.env file):

PHP:

Java (Spring Boot application.properties):

CORS Issues (Browser/Frontend)

circle-exclamation

Solution: Create a backend proxy endpoint that calls Docs-Dispatcher from your server.

Getting Help

Before Asking for Help

  1. โœ… Check this troubleshooting guide

  2. โœ… Enable debug logging

  3. โœ… Test with API validation endpoint

When Reporting Issues

Include the following information:

  • SDK version: Check package.json, composer.json, or pom.xml

  • API version: Check response headers or dashboard

  • Error message: Full error output

  • Code snippet: Minimal reproducible example

  • Debug logs: With sensitive data redacted

  • Environment: OS, runtime version (Node.js, PHP, Java)

Support Channels

GitLab Issues:

Email Support: [email protected]

Documentation:

API Status: status.docs-dispatcher.ioarrow-up-right

Next Steps

SDK Documentation

Provider Configuration

Authentication Guide

Last updated