| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…tch a string due to boundary constraints on the regex
There was a problem hiding this comment.
This PR fixes an issue with the regex used to match API error messages by removing the regex boundaries so that error messages containing extra context can be detected for proper telemetry reporting. It also adds additional tests to verify the behavior of getActionsStatus and wrapApiConfigurationError functions across both TypeScript and JavaScript implementations.
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file| File | Description |
|---|---|
| src/status-report.test.ts | Added tests for various error types and updated imports |
| src/api-client.ts | Modified regex to remove boundaries for improved API error matching |
| src/api-client.test.ts | Added tests for the updated API error wrapping behavior |
| lib/status-report.test.js | Added JavaScript tests mirroring TypeScript tests for error handling |
| lib/api-client.test.js | Added JavaScript tests for API error wrapping functionality |
| lib/api-client.js | Modified regex to remove boundaries in API error matching |
src/status-report.test.ts:214
t.is(getActionsStatus(new ConfigurationError("exit code 1"), "multiple things went wrong"), "user-error", "getActionsStatus should return failure if passed a configuration error and an additional failure cause");
src/api-client.ts:248
/ref .* not found in this repository/.test(e.message)
lib/api-client.js:209
/ref .* not found in this repository/.test(e.message)
Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for adding tests!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
This fixes an issue with a regex pattern match on API errors failing due to regex boundaries on the pattern, which would affect telemetry.
Merge / deployment checklist
Note: This change doesn't affect users and doesn't require any changes to the readme or the changelog.