System Integrator (SI) ToolkitSystem Integrator (SI) Toolkit
Introduction
Management
Business Operations
Technical Integration Guide
Deployment
Technical Reference
Scheme Designs
Introduction
Management
Business Operations
Technical Integration Guide
Deployment
Technical Reference
Scheme Designs
  • Introduction

    • System Integrator (SI) Toolkit
    • DFSP Onboarding Guide and Roadmap
    • Customer Journey
  • Management
  • Business Operations
  • Technical Integration Guide

    • Technical Integration
    • Inclusive Instant Payment System (IIPS) Integration
    • Development guide for building core-connectors
    • Core Connector Testing Harness
    • Core Connector Template
    • ISO20022 and Merchant Payments.
  • Deployment

    • Overview
    • Docker Compose

      • Payment Manager Deployment Guide
      • Core Connector Guide
      • Deploying Payment Manager
      • Configuring the core connectors
      • Connecting to a Hub
      • Securing the Docker Daemon
      • Firewall Configuration in Ubuntu and AWS EC2 (t2.large)
      • Test Transfer Process
  • Technical Reference

    • API Service
    • Routing and API Specifications
    • Networking
    • Core Banking Solution (CBS) Client
    • Mojaloop Connector Client (SDK Client)
    • Configuration.
    • Core Connector Aggregate (Business Logic)
    • Error Handling
    • Integration Accounts
    • Request Handling Lifecycle
  • Scheme Designs

    • Foreign Exchange - Currency Conversion
    • Interscheme

Error Handling

Whenever an exception is while handling a request, the exception is checked to see that has an httpCode, mlCode and a message. If it has all these set, we return a response with this structure.

The http status code will be the error object's httpCode attribute. The mlCode and message are serialized into a json object that has this structure.

{
    "mlCode":"4000",
    "message": "Something wrong happened"
}

The mlCode is an fspiop compliant error code that can be got from the mojaloop documentation

Every module in src/domain has it's own error class. But all of them extend a BasicError class. For more information about the errors, read through the errors section of the SDK Client and CBS Client documentation.

To return an error response to for a particular request, just throw an exception and set the message, mlCode and httpCode and the core connecotor wrapper code will handle the return of the http response.

Last Updated:
Contributors: Paul Baker
Prev
Core Connector Aggregate (Business Logic)
Next
Integration Accounts