When treasury reports fail there is not much contextual information added to the logs to easily identify:
Which files or source-data is causing the issue?
Which users are impacted?
Current State
When an error occurs in the arpa treasury report generation we see generic information of the stack trace and system-generated error message as seen by this trace.
For example:
Error: Unsupported ZIP Compression method NaN
at parse_local_file (/app/node_modules/xlsx/xlsx.js:2688:18)
at parse_zip (/app/node_modules/xlsx/xlsx.js:2649:3)
at parse (/app/node_modules/xlsx/xlsx.js:1485:47)
at Object.read (/app/node_modules/xlsx/xlsx.js:1817:9)
at zip_read (/app/node_modules/xlsx/xlsx.js:3434:43)
at read_zip (/app/node_modules/xlsx/xlsx.js:23643:8)
at readSync (/app/node_modules/xlsx/xlsx.js:23715:69)
at Object.readFileSync (/app/node_modules/xlsx/xlsx.js:23738:9)
at loadTemplate (/app/src/arpa_reporter/services/get-template.js:49:27)
at getTemplate (/app/src/arpa_reporter/services/get-template.js:62:28)
Expected State
When an error occurs in the arpa treasury report generation we see:
Stack trace (which already exists today)
Input-data (filename) that caused the error to occur (or filename that caused the issue)
For Example:
Error: Unsupported ZIP Compression method NaN. Please review contents of filename: "projectBulkUpload.csv"
Note: this additional information should only be logged in case of an error. We do not need logging for every single upload/file that is being iterated on for aggregation.
Why is this issue important?
When treasury reports fail there is not much contextual information added to the logs to easily identify:
Current State
When an error occurs in the arpa treasury report generation we see generic information of the stack trace and system-generated error message as seen by this trace. For example:
Expected State
When an error occurs in the arpa treasury report generation we see:
For Example:
Note: this additional information should only be logged in case of an error. We do not need logging for every single upload/file that is being iterated on for aggregation.
Implementation Plan
The following functions need to be added...
Relevant Code Snippets
No response