Dataswyft API Platform: Developers Docs
WebsiteGitHubSlackLogin
  • About Dataswyft
    • Community & Support
  • Learn about Dataswyft Platform
    • Decentralized Data Servers
    • Personal Data Account
      • HMIC Permissions
      • Namespaces
      • Single Sign-On
    • Data Wallet
      • Data Wallet Canvas and Solutions
      • CheckD Data Wallet: Release Notes
    • Dataswyft One
      • Compute Tools
  • Build on Dataswyft Platform
    • Dataswyft One APIs
      • Data API
        • Filtering, Querying & Transforming Data
        • Data Debit
      • File Storage API
      • Computations API
      • Postman Collection
    • Integrating with Data Wallets
    • Getting Started
      • Quick Start
      • Developers Portal
        • Updating and Submitting an Application
        • Deleting an Application
        • Application Statuses
      • Application Example - React
        • 1. Environment Setup
        • 2. Create Main Structure
        • 3. Main Page & Routing
        • 4. User Authentication
        • 6. CRUD Operations
        • 5. Component Pages
  • Deploy
    • Application Review
    • Rating Assurance & Certification
    • Live Application Ratings
  • Knowledge Base
    • Security Practices
    • FAQ
    • Glossary of Terms
  • Dataswyft
Powered by GitBook
On this page

Was this helpful?

  1. Build on Dataswyft Platform
  2. Advanced Topics
  3. User Journeys
  4. Password Management
  5. Guides
  6. JavaScript

6. Handling Errors

Handling Errors

HAT JS error response:

{
  cause: string,   // The cause of the error.
  message: string, // The message of the error.
  status: number   // When the cause is HAT_API_EXCEPTION you can handle the HTTP response code.
}

Error Codes:

Cause

Message

Error definitions

HAT_CLIENT_VALIDATION

HAT_DOMAIN_IS_UNDEFINED

hatDomain parameter is required

HAT_CLIENT_VALIDATION

RECORD_IDS_MISSING

recordsIds array parameter is empty or null

HAT_CLIENT_VALIDATION

APPLICATION_NOT_SUPPORTED

application is not supported

HAT_CLIENT_VALIDATION

NOT_AUTHENTICATED

client is not authenticated

HAT_TOKEN_VALIDATION

HAT_TOKEN_IS_NOT_VALID_OR_EXPIRED

Authentication token has expired or is not valid

HAT_TOKEN_VALIDATION

HAT_TOKEN_IS_UNDEFINED

Authentication token is undefined

HAT_TOKEN_VALIDATION

HAT_TOKEN_FAILED_TO_DECODE

Authentication token has failed to decode

HAT_API_EXCEPTION

HTTP_RESPONSE_FAILED

HTTP response failed

HAT_FILE_API_EXCEPTION

FILE_IS_UNDEFINED

File parameter is undefined

HAT_FILE_API_EXCEPTION

FAILED_TO_FETCH_METADATA

Failed to fetch HAT File metadata

HAT_FILE_API_EXCEPTION

FILE_FAILED_TO_UPLOAD

Failed to upload the file to AWS

Last updated 3 years ago

Was this helpful?