Skip to content

[Backend] backend/src/config/loanConfig.ts values are not validated at startup #1519

Description

@grantfox-oss

Join our community: https://t.me/+DOylgFv1jyJlNzM0

Why this matters
backend/src/config/loanConfig.ts centralizes loan thresholds referenced across controllers and services, but nothing asserts at process start that the values are internally consistent, unlike backend/src/config/env.ts which has envValidation.test.ts.

Acceptance criteria

  • Add a startup validation function for loanConfig.ts mirroring the pattern in env.ts
  • Add a unit test asserting invalid configs, such as min score above max score, throw at startup

Files to touch

  • backend/src/config/loanConfig.ts
  • backend/src/tests/envValidation.test.ts

Out of scope
Changing the actual threshold values.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendIssues related to backend developmentgood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions