Skip to content

test log #10

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

Merged
merged 1 commit into from
Jul 10, 2025
Merged

test log #10

merged 1 commit into from
Jul 10, 2025

Conversation

vas3a
Copy link
Collaborator

@vas3a vas3a commented Jul 10, 2025

No description provided.

@vas3a vas3a merged commit d9ecc69 into dev Jul 10, 2025
1 check passed
@vas3a vas3a deleted the logger-level-for-challenges branch July 10, 2025 14:32
@@ -54,6 +54,11 @@ export class QueryChallengesTool {
this.logger.error(
`Failed to fetch challenges from Topcoder API: ${challenges.statusText}`,
);
try {
this.logger.error(await challenges.json());

Choose a reason for hiding this comment

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

medium
correctness
Consider checking if challenges has a valid JSON response before attempting to parse it. This can prevent unnecessary exceptions and improve error handling.

@@ -108,7 +113,7 @@ export class QueryChallengesTool {
},
};
} catch (error) {
this.logger.error(`Error fetching challenges: ${error.message}`);
this.logger.error(`Error fetching challenges: ${error.message}`, error);

Choose a reason for hiding this comment

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

medium
security
Passing the entire error object to the logger can be beneficial for debugging as it may include additional context like stack traces. Ensure that the logger is configured to handle and securely store this information, especially if it contains sensitive data.

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.

1 participant