-
Notifications
You must be signed in to change notification settings - Fork 95
ci: add extra log to debug failure on CI #912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: add extra log to debug failure on CI #912
Conversation
size-limit report 📦
|
| ); | ||
| }); | ||
| page.on("requestfinished", async (req) => { | ||
| if (req.method() === "OPTION") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The HTTP method should be OPTIONS (with an 'S' at the end) rather than OPTION. This typo will prevent the condition from matching actual OPTIONS requests, causing them to be processed when they should be skipped.
| if (req.method() === "OPTION") { | |
| if (req.method() === "OPTIONS") { |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
| const resp = await req.response(); | ||
| let respText; | ||
| try { | ||
| respText = req.url().startsWith(TEST_APPLICATION_SERVER_BASE_URL) | ||
| ? await resp.text() | ||
| : "response omitted"; | ||
| } catch (e) { | ||
| respText = "response loading failed " + e.message; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When handling failed requests, resp could be null or undefined, which would cause errors when calling resp.status() or resp.text(). Consider adding a null check before accessing response properties:
const resp = await req.response();
let respText;
if (!resp) {
respText = 'No response available';
} else {
try {
respText = req.url().startsWith(TEST_APPLICATION_SERVER_BASE_URL)
? await resp.text()
: "response omitted";
} catch (e) {
respText = "response loading failed " + e.message;
}
}This will prevent potential runtime errors when processing failed requests.
| const resp = await req.response(); | |
| let respText; | |
| try { | |
| respText = req.url().startsWith(TEST_APPLICATION_SERVER_BASE_URL) | |
| ? await resp.text() | |
| : "response omitted"; | |
| } catch (e) { | |
| respText = "response loading failed " + e.message; | |
| } | |
| const resp = await req.response(); | |
| let respText; | |
| if (!resp) { | |
| respText = 'No response available'; | |
| } else { | |
| try { | |
| respText = req.url().startsWith(TEST_APPLICATION_SERVER_BASE_URL) | |
| ? await resp.text() | |
| : "response omitted"; | |
| } catch (e) { | |
| respText = "response loading failed " + e.message; | |
| } | |
| } |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
Summary of change
(A few sentences about this PR)
Related issues
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
Documentation changes
(If relevant, please create a PR in our docs repo, or create a checklist here highlighting the necessary changes)
Checklist for important updates
frontendDriverInterfaceSupported.jsonfile has been updated (if needed)package.jsonpackage-lock.jsonlib/ts/version.tsnpm run build-prettygit tag) in the formatvX.Y.Z, and then find the latest branch (git branch --all) whoseX.Yis greater than the latest released tag.someFunc: function () {..}).size-limitsection ofpackage.jsonwith the size limit set to the current size rounded up.rollup.config.mjslib/ts/types.tslib/ts/recipe/multifactorauth/types.tsRemaining TODOs for this PR