In the case that a reportFile does exist, but is empty, JSON.parse() returns null, which ends up throwing a confusing error message later on src/getPullRequestChangedAnalyzedReport.ts#L20 about filter not existing on a null object.
This change improves the error message by checking and throwing a clear error message at an earlier point of failure.
Note: I'm not sure if I updated the build files correctly. I ran npm run build, but dist/index.js has a ton of changes, which don't look related to my change. Let me know if I need to do something differently.
In the case that a
reportFile
does exist, but is empty,JSON.parse()
returnsnull
, which ends up throwing a confusing error message later onsrc/getPullRequestChangedAnalyzedReport.ts#L20
aboutfilter
not existing on anull
object.This change improves the error message by checking and throwing a clear error message at an earlier point of failure.
Note: I'm not sure if I updated the build files correctly. I ran
npm run build
, butdist/index.js
has a ton of changes, which don't look related to my change. Let me know if I need to do something differently.