mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-29 02:54:09 -05:00
* Add nordigen integration * Move normalizatoin of accounts to the backend side * Remove .idea from git * Move normalization of transactions to the backend side * Fix some edgecases * Move nordigen to separate directory * Partial refactor of nordigen and e2e test * WIP refactor * Refactoring * Refactoring * Add more tests * Update get accounts path * Rm not needed import * Fix after merge * Fix AnimatedLoading * Fix coverage, jest config, linter * Code review changes * Upgrade to ESM nordigen * Upgrade to ESM nordigen * Remove e2e tests and cleanup packages * Move env vars to config * Rollback prettierrc config * Move nordigen app behind to src * Revert supertest lib * Fixing specs * fixes linter * Fix build errors * Fix linter * Update nordigen-node lib * remove snapshot * remove babel * Fix spec * fix linter * Revert "remove babel" This reverts commit 07ce9fc46043a425f6e83b0b5ce15789fd07e12e. * Fix coverage * Add supertest * Add sortByBookingDate as default sort option for integration bank * Add comment with explanation of client const --------- Co-authored-by: Filip Stybel <filip.stybel@ynd.co>
85 lines
1.9 KiB
JavaScript
85 lines
1.9 KiB
JavaScript
export class RequisitionNotLinked extends Error {
|
|
constructor(params = {}) {
|
|
super('Requisition not linked yet');
|
|
this.details = params;
|
|
}
|
|
}
|
|
|
|
export class AccountNotLinedToRequisition extends Error {
|
|
constructor(accountId, requisitionId) {
|
|
super('Provided account id is not linked to given requisition');
|
|
this.details = {
|
|
accountId,
|
|
requisitionId
|
|
};
|
|
}
|
|
}
|
|
|
|
export class GenericNordigenError extends Error {
|
|
constructor(data = {}) {
|
|
super('Nordigen returned error');
|
|
this.details = data;
|
|
}
|
|
}
|
|
|
|
export class NordigenClientError extends Error {
|
|
constructor(message, details) {
|
|
super(message);
|
|
this.details = details;
|
|
}
|
|
}
|
|
|
|
export class InvalidInputDataError extends NordigenClientError {
|
|
constructor(response) {
|
|
super('Invalid provided parameters', response);
|
|
}
|
|
}
|
|
|
|
export class InvalidNordigenTokenError extends NordigenClientError {
|
|
constructor(response) {
|
|
super('Token is invalid or expired', response);
|
|
}
|
|
}
|
|
|
|
export class AccessDeniedError extends NordigenClientError {
|
|
constructor(response) {
|
|
super('IP address access denied', response);
|
|
}
|
|
}
|
|
|
|
export class NotFoundError extends NordigenClientError {
|
|
constructor(response) {
|
|
super('Resource not found', response);
|
|
}
|
|
}
|
|
|
|
export class ResourceSuspended extends NordigenClientError {
|
|
constructor(response) {
|
|
super(
|
|
'Resource was suspended due to numerous errors that occurred while accessing it',
|
|
response
|
|
);
|
|
}
|
|
}
|
|
|
|
export class RateLimitError extends NordigenClientError {
|
|
constructor(response) {
|
|
super(
|
|
'Daily request limit set by the Institution has been exceeded',
|
|
response
|
|
);
|
|
}
|
|
}
|
|
|
|
export class UnknownError extends NordigenClientError {
|
|
constructor(response) {
|
|
super('Request to Institution returned an error', response);
|
|
}
|
|
}
|
|
|
|
export class ServiceError extends NordigenClientError {
|
|
constructor(response) {
|
|
super('Institution service unavailable', response);
|
|
}
|
|
}
|