Skip to content

fix : added proper error handling to failure logs #42

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tech-sushant
Copy link
Contributor

Fixed an issue where an error in fetching one type of logs was disrupting the retrieval of all log types.

@@ -64,16 +73,17 @@ export async function retrieveSessionFailures(
},
});

await assertOkResponse(response, "session logs");
const validationResult = validateLogResponse(response, "session logs");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const validationResult = validateLogResponse(response, "session logs");
const validationError = validateLogResponse(response, "session logs");

do this in all places

logs.length > 0
? `Network Failures (${logs.length} found):\n${JSON.stringify(logs, null, 2)}`
: "No network failures found",
response.message ||
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

directly return the result of these conditionals in the response (for other methods as well)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain this change a bit ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants