react-native-unit-components
Version:
Unit React Native components
39 lines (35 loc) • 1.24 kB
text/typescript
export type UNError = {
errors: UNErrorData[]
}
export type UNErrorData = {
status?: string,
title: string,
detail?: string,
details?: string,
meta?: UNErrorMeta
code?: UNErrorCodes,
error?: Error
}
interface UNErrorMeta {
meta: Record<string, string>,
}
export enum UNErrorCodes {
FEATURE_DISABLED = 'feature_disabled',
INVALID_VALUE = 'invalid_value',
LIMITS_EXCEEDED = 'limits_exceeded',
NOT_FOUND = 'not_found',
ACCOUNT_CUSTOMER_MISMATCH = 'account_customer_mismatch',
NOT_SUPPORTED_FOR_ACCOUNT_STATUS = 'not_supported_for_account_status',
NOT_SUPPORTED_FOR_ACCOUNT_TYPE = 'not_supported_for_account_type',
NOT_SUPPORTED_FOR_CARD = 'not_supported_for_card',
NOT_SUPPORTED_FOR_CARD_STATUS = 'not_supported_for_card_status',
NOT_SUPPORTED_FOR_CARD_TYPE = 'not_supported_for_card_type',
INVALID_NONCE = 'invalid_nonce',
NOT_SUPPORTED_FOR_PAYMENT_TYPE = 'not_supported_for_payment_type',
PAYMENT_INVALID = 'payment_invalid',
UNAUTHORIZED = 'unauthorized',
FORBIDDEN = 'forbidden',
ALREADY_EXISTS = 'already_exists',
CUSTOMER_NAME_UNDELIVERABLE = 'customer_name_undeliverable',
CUSTOMER_ADDRESS_UNDELIVERABLE = 'customer_address_undeliverable',
}