Validation Messages and Codes
This document provides a comprehensive overview of all validation error codes and messages used in the Repayment Schedule Request flow.
Error Code Reference
LOAN_NOT_DISBURSED
Error Code: loan_not_disbursed
Message: "Loan is not disbursed"
Description: The loan must be in disbursed status to create a repayment schedule request.
MAX_RENEGOTIATIONS_EXCEEDED
Error Code: max_renegotiations_exceeded
Message: "Maximum number of renegotiations of this type exceeded"
Description: The maximum number of active renegotiation requests for this type has been reached. The limit is 1 for most types and 2 for TERM_EXTENSION_RESTRUCTURING
.
NO_ACTIVE_SCHEDULE
Error Code: no_active_schedule
Message: "There is no active repayment schedule for this loan"
Description: The loan must have an active repayment schedule to create a renegotiation request.
NO_INSTALLMENTS
Error Code: no_installments
Message: "Active schedule does not have installments"
Description: The active repayment schedule must contain at least one installment.
NO_PROPOSED_SCHEDULE
Error Code: no_proposed_schedule
Message: "Proposed schedule does not contain installments"
Description: The proposed schedule must contain at least one installment.
INVALID_DUE_DATE
Error Code: invalid_due_date
Messages:
- "Proposed installments do not have 'due_date' field"
- "Invalid due date: 08/10/2025. Expected format: YYYY-MM-DD"
- "No changes in due dates of installments"
- "Last proposed installment date (2025-10-08) must be after the last active installment date (2025-11-25)"
Description: Various validation failures related to due dates in the proposed schedule.
INVALID_INSTALLMENTS
Error Code: invalid_installments
Messages:
- "Proposed installments do not have 'fixed_amount' field"
- "Invalid fixed_amount: any string"
- "Installment fixed_amount must be greater than zero"
Description: Validation failures related to installment amounts and structure.
MAX_DUE_DATE_EXCEEDED
Error Code: max_due_date_exceeded
Message: "Maximum due date proposed (2025-12-31) exceeds the maximum due date of the active schedule (2025-12-20)"
Description: For DUE_DATE_ADJUSTMENT
type, the proposed due dates cannot extend beyond the original schedule's maximum due date.
MAX_INSTALLMENTS_EXCEEDED
Error Code: max_installments_exceeded
Message: "Maximum number of installments exceeded: 18 installments, max is 12"
Description: The proposed schedule exceeds the facility's maximum allowed number of installments.
INVALID_DISCOUNT
Error Code: invalid_discount
Message: "Discount amount (150.0) exceeds maximum allowed discount (100.). Present value: 1200.0, Outstanding principal: 1100.0."
Description: For LOSS_RISK_AGREEMENT
type, the discount amount cannot exceed the difference between present value and outstanding principal.
LOW_INTEREST_RATE
Error Code: low_interest_rate
Messages:
- "Inferred interest rate is NaN"
- "Inferred interest rate 0.035 is less than the minimum allowed interest rate 0.0679"
Description: The calculated interest rate is either invalid (NaN) or below the minimum threshold configured in the repayment adapter.
GRACE_PERIOD_EXCEEDED
Error Code: grace_period_exceeded
Message: "First proposed date 2026-02-10 is more than 60 days from today 2025-10-08"
Description: The first proposed installment date exceeds the maximum grace period allowed by the repayment adapter.
INTEREST_RATE_CHANGED
Error Code: interest_rate_changed
Message: "Interest rate cannot change for due date adjustment. Loan interest rate: 0.1200, inferred interest rate: 0.1176"
Description: For DUE_DATE_ADJUSTMENT
type, the interest rate must remain unchanged from the original loan.
NOT_DEFAULT_ENOUGH
Error Code: not_default_enough
Message: "Loss risk agreement allowed only for default over 90 days"
Description: For LOSS_RISK_AGREEMENT
type, the loan must be in default for the minimum required number of days.
JUSTIFICATION_REQUIRED
Error Code: justification_required
Message: "Formal justification is required for loss risk agreement"
Description: For LOSS_RISK_AGREEMENT
type, a formal justification must be provided.
APPROVER_NOT_ALLOWED
Error Code: approver_not_allowed
Messages:
- "Approver name is required for loss risk agreement"
- "Approver name is not allowed to approve this request"
Description: For LOSS_RISK_AGREEMENT
type, an approver name is required and must be in the list of allowed approvers.
TYPE_NOT_SUPPORTED
Error Code: type_not_supported
Message: "Renegotiation type not supported"
Description: The requested renegotiation type is not supported by the system.
Updated 6 days ago