Skip to content

Conversation

ArtemHoruzhenko
Copy link
Collaborator

No description provided.

@ArtemHoruzhenko ArtemHoruzhenko force-pushed the feature/RI-6205-enhance-logs branch from adedf58 to 9555209 Compare April 24, 2025 11:51
KIvanow
KIvanow previously approved these changes Apr 25, 2025
Comment on lines 7 to 11
const error1 = new Error('Original error');
error1['some'] = 'field';
const error2 = new NotFoundException('Not found', { cause: error1 });
const error3 = new BadRequestException('Bad req', { cause: error2 });
const error4 = new CloudOauthMisconfigurationException('Misconfigured', { cause: error3 });
Copy link
Collaborator

Choose a reason for hiding this comment

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

These names are not very descriptive

Suggested change
const error1 = new Error('Original error');
error1['some'] = 'field';
const error2 = new NotFoundException('Not found', { cause: error1 });
const error3 = new BadRequestException('Bad req', { cause: error2 });
const error4 = new CloudOauthMisconfigurationException('Misconfigured', { cause: error3 });
const genericError = new Error('Original error');
genericError['some'] = 'field';
const notFoundError = new NotFoundException('Not found', { cause: error1 });
const badRequestError = new BadRequestException('Bad req', { cause: error2 });
const cloudError = new CloudOauthMisconfigurationException('Misconfigured', { cause: error3 });

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok. I've changed them to more meaningful names


const mockLogData: any = {
sessionMetadata: mockSessionMetadata,
error: error4,
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
error: error4,
error: cloudError,

sessionMetadata: mockSessionMetadata,
error: error4,
data: [
error3,
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
error3,
badRequestError,

Copy link
Collaborator

@pd-redis pd-redis left a comment

Choose a reason for hiding this comment

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

I think now is much more understandable

@ArtemHoruzhenko ArtemHoruzhenko merged commit 2e7e920 into main May 12, 2025
28 checks passed
@ArtemHoruzhenko ArtemHoruzhenko deleted the feature/RI-6205-enhance-logs branch May 12, 2025 08:33
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.

3 participants