Skip to main content

Common Errors

This guide covers common errors you may encounter when working with the Consent Management API and how to resolve them.

400 Bad Request

Missing Required Consents

Error:
Cause: Not all required consents for the policy type are present in the request. Required Consents by Policy:
  • US Policy: eSignAct (E-Sign Act compliance), termsAndPrivacy, marketingNotifications, smsNotifications, emailNotifications
  • Global Policy: termsAndPrivacy, marketingNotifications, smsNotifications, emailNotifications (excludes eSignAct)
Solution:

Error:
Cause: Using a consent type that’s not supported by the API. Valid Consent Types:
  • eSignAct
  • termsAndPrivacy
  • marketingNotifications
  • smsNotifications
  • emailNotifications
Solution:

Error:
Cause: Using an invalid status value during consent creation. Valid Status Values:
  • For creation: granted, denied
  • For revocation: revoked (set automatically)
Solution:

Empty Onboarding ID

Error:
Cause: Missing or empty onboardingId in request. Solution:

Missing Tenant ID

Error:
Cause: Missing tenantId field in request. Solution:
The tenantId value should be provided by Baanx during onboarding. Contact support if you don’t have your tenant ID.

409 Conflict

Duplicate Onboarding ID

Error:
Cause: Attempting to create a consent set with an onboardingId that already exists. Solution: Generate a new unique onboardingId:

User Already Linked

Error:
Cause: Attempting to link a userId to a consent set that’s already been linked. Solution: Check if consent set is already linked before attempting to link:

404 Not Found

Error:
Cause: Attempting to access a consent set that doesn’t exist or was deleted. Possible Reasons:
  • ❌ Incorrect consentSetId
  • ❌ Consent set created in different environment (sandbox vs production)
  • ❌ Using wrong tenant context
Solution:

User Not Found

Error:
Cause: Attempting to retrieve consents for a user who has no consent sets. Solution: Handle missing consent gracefully:

Error:
Cause: Attempting to revoke a consent that doesn’t exist or has already been revoked. Solution:

498 Invalid Client Key

Error:
Cause: Missing, incorrect, or expired x-client-key header. Solution:
If your client key is expired or invalid, contact Baanx support to obtain new credentials.

499 Missing Client Key

Error:
Cause: x-client-key header not included in request. Solution: Ensure all requests include the required header:

500 Internal Server Error

Error:
Cause: Unexpected server-side error. Solution: Implement retry logic with exponential backoff:
If 500 errors persist, contact Baanx support with your request details and timestamp for investigation.

Common Integration Issues

Symptoms:
  • Created consent set with all required consents
  • Status returns incomplete instead of complete
Possible Causes:
  1. Using denied status for required consents:
    Fix: Required consents must be granted:
  2. Revoked consents: If any required consent has been revoked, status becomes incomplete. Check:

Symptoms:
  • Created consent set successfully
  • Can’t retrieve it using GET /v2/consent/user/{userId}
Cause: Consent set hasn’t been linked to a userId yet. Solution:
  1. After creating consent set, store the consentSetId:
  2. After user creation, link the consent set:
  3. Now you can retrieve by userId:

Issue: Metadata Not Appearing in Audit Trail

Symptoms:
  • Provided metadata in consent creation
  • Metadata missing or incomplete in audit records
Cause: Metadata field was not properly structured or contained invalid values. Solution: Ensure metadata is a valid JSON object:
All metadata values must be serializable to JSON. Avoid passing functions, circular references, or undefined values.

Symptoms:
  • Received _links object in response
  • Following links results in 404 errors
Cause: Links are environment-specific and may point to incorrect environment. Solution: Parse and use the href from _links directly:
Don’t construct URLs manually - use the provided links.

Issue: Rate Limiting

Symptoms:
  • Requests failing intermittently
  • 429 Too Many Requests errors
Solution: Implement rate limiting and request queuing:

Debugging Tips

1. Enable Request Logging

2. Validate Before Sending

3. Test in Sandbox First

Always test consent flows in sandbox environment before production:

Getting Help

If you continue experiencing issues:
  1. Check API Status: Verify the Baanx API is operational
  2. Review Request/Response: Use logging to inspect full request and response
  3. Contact Support: Email support@baanx.com with:
    • Request timestamp
    • Request/response details (redact sensitive data)
    • x-request-id from response headers
    • Steps to reproduce

Next Steps

Implementation Guide

Return to implementation guide

API Reference

Complete endpoint documentation

Compliance Guide

Regulatory requirements

Overview

Back to consent management overview