| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Warning
The newly added API rejection behavior lacks direct unit coverage.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Improves configuration-error classification during init-action-post.
Changes:
| File | Description |
|---|---|
| src/init-action-post.ts | Reuses configuration and classifies API errors. |
| src/api-client.ts | Wraps GitHub version API failures. |
| lib/entry-points.js | Generated, excluded file; not reviewed. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
|
@mario-campos I pushed three more commits here. The first two just refactor the existing tests for wrapApiConfigurationError and don't change them. The third adds one additional test to check that wrapApiConfigurationError(wrapApiConfigurationError(err)) == wrapApiConfigurationError(err), i.e. it doesn't double-wrap errors. I wanted to make sure that the added wrapApiConfigurationError call in the error handler in run doesn't accidentally break the case where the caught "unwrappedError" was already run through wrapApiConfigurationError previously. |
Sorry, something went wrong.
There was a problem hiding this comment.
Makes sense 👍
One minor suggestion: I don't see a test for the wrapApiConfigurationError fallback/identity path (i.e. the one in which you pass a non-error value and it is returned). If it already exists and I just missed it, feel free to ignore.
Sorry, something went wrong.
@mario-campos Several of the tests for wrapApiConfigurationError exercise this. For example, while the "wrapApiConfigurationError doesn't wrap errors it isn't supposed to" test talks about "errors", anything that is passed into wrapApiConfigurationError that isn't like a HTTPError goes through the fallback/identity path. See the t.is assertions that check that result of wrapApiConfigurationError matches what we provided as argument (by object identity). |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR adds wrapApiConfigurationError handling to the general exception handler for the init-action-post step. Also includes some related, minor improvements.
Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Workflow types:
Products:
Environments:
How did/will you validate this change?
If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist