Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict'
const Shared = require('@mojaloop/central-services-shared')
const BaseError = Shared.BaseError
const ErrorCategory = Shared.ErrorCategory
class RecordExistsError extends BaseError {
constructor (message = 'Participant currency has already been registered') {
super(ErrorCategory.UNPROCESSABLE, message)
}
}
module.exports = RecordExistsError
'use strict'
const Shared = require('@mojaloop/central-services-shared')
const BaseError = Shared.BaseError
const ErrorCategory = Shared.ErrorCategory
class HubAccountTypeError extends BaseError {
constructor (message = 'The requested hub operator account type is not allowed.') {
super(ErrorCategory.UNPROCESSABLE, message)
}
}
module.exports = HubAccountTypeError
'use strict'
const Shared = require('@mojaloop/central-services-shared')
const BaseError = Shared.BaseError
const ErrorCategory = Shared.ErrorCategory
class HubAccountExistsError extends BaseError {
constructor (message = 'Hub account has already been registered.') {
super(ErrorCategory.UNPROCESSABLE, message)
}
}
module.exports = HubAccountExistsError
'use strict'
const Shared = require('@mojaloop/central-services-shared')
const BaseError = Shared.BaseError
const ErrorCategory = Shared.ErrorCategory
class EndpointReservedForHubAccountsError extends BaseError {
constructor (message = 'Endpoint is reserved for creation of Hub account types only.') {
super(ErrorCategory.UNPROCESSABLE, message)
}
}
module.exports = EndpointReservedForHubAccountsError
constructor (message) {
super(Shared.ErrorCategory.BAD_REQUEST, message)
}
}
constructor (message = 'Fulfilment does not match any condition') {
super(Shared.ErrorCategory.UNPROCESSABLE, message)
}
}
'use strict'
const Shared = require('@mojaloop/central-services-shared')
const BaseError = Shared.BaseError
const ErrorCategory = Shared.ErrorCategory
class ParticipantAccountCreateError extends BaseError {
constructor (message = 'Participant account and Position create have failed.') {
super(ErrorCategory.UNPROCESSABLE, message)
}
}
module.exports = ParticipantAccountCreateError