bcgov / SIMS

Student Information Management System. Post-Secondary Student Financial Aid System
Apache License 2.0
25 stars 14 forks source link

Bug in submitting application when the Total income has integers #2688

Closed guru-aot closed 9 months ago

guru-aot commented 10 months ago

Question to SABC Confirm CRA Requirements for integers Is this a bug or do we need other requirements to round?

Error when the total family income has integers in Submitting the application.

image.png

Camunda error in the assessment gateway

Unexpected error while processing job. {
  "stack": "QueryFailedError: invalid input syntax for type integer: \"10000.01\"\n    at PostgresQueryRunner.query (/opt/app-root/src/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async InsertQueryBuilder.execute (/opt/app-root/src/node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:33)\n    at async CRAIntegrationController.createIncomeRequest (/opt/app-root/src/dist/apps/workers/main.js:12458:35)\n    at async /opt/app-root/src/node_modules/@nestjs/microservices/context/rpc-proxy.js:11:32\n    at async ZeebeTransportStrategy.workerHandlerWrapper (/opt/app-root/src/dist/apps/workers/main.js:8181:31)\n    at async ZBWorker.handleJob (/opt/app-root/src/node_modules/zeebe-node/dist/zb/ZBWorker.js:22:13)",
  "message": "invalid input syntax for type integer: \"10000.01\"",
  "query": "INSERT INTO \"sims\".\"cra_income_verifications\"(\"created_at\", \"updated_at\", \"tax_year\", \"reported_income\", \"cra_reported_income\", \"date_sent\", \"date_received\", \"file_sent\", \"file_received\", \"match_status_code\", \"request_status_code\", \"inactive_code\", \"creator\", \"modifier\", \"application_id\", \"supporting_user_id\") VALUES (DEFAULT, DEFAULT, $1, $2, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, $3, DEFAULT) RETURNING \"created_at\", \"updated_at\", \"id\"",
  "parameters": [
    2022,
    10000.01,
    107176
  ],
  "driverError": {
    "stack": "error: invalid input syntax for type integer: \"10000.01\"\n    at Parser.parseErrorMessage (/opt/app-root/src/node_modules/pg-protocol/dist/parser.js:278:15)\n    at Parser.handlePacket (/opt/app-root/src/node_modules/pg-protocol/dist/parser.js:126:29)\n    at Parser.parse (/opt/app-root/src/node_modules/pg-protocol/dist/parser.js:39:38)\n    at Socket.<anonymous> (/opt/app-root/src/node_modules/pg-protocol/dist/index.js:10:42)\n    at Socket.emit (node:events:517:28)\n    at addChunk (node:internal/streams/readable:335:12)\n    at readableAddChunk (node:internal/streams/readable:308:9)\n    at Readable.push (node:internal/streams/readable:245:10)\n    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)",
    "message": "invalid input syntax for type integer: \"10000.01\"",
    "length": 109,
    "severity": "ERROR",
    "code": "22P02",
    "file": "numutils.c",
    "line": "259",
    "routine": "pg_strtoint32"
  },
  "length": 109,
  "severity": "ERROR",
  "code": "22P02",
  "file": "numutils.c",
  "line": "259",
  "routine": "pg_strtoint32"
}

Acceptance Criteria

sh16011993 commented 9 months ago

@HRAGANBC @CarlyCotton @Joshua-Lakusta What should be validation message for the max. limit that is shown to the user?

CarlyCotton commented 9 months ago

@sh16011993 "The number you have entered is outside the expected range."