Skip to content
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

feat: show error message received from the server in logs explorer views #4898

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

YounixM
Copy link
Collaborator

@YounixM YounixM commented Apr 22, 2024

Screenshot 2024-04-23 at 12 54 54 AM

@YounixM YounixM marked this pull request as ready for review April 22, 2024 19:25
@github-actions github-actions bot added the enhancement New feature or request label Apr 22, 2024
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>


export default function LogsError({
errorData,
}: {
Copy link
Contributor

Choose a reason for hiding this comment

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

ideally we should avoid using inline defining of interface

let serverErrorMessage = null;

if (errorData && errorData.cause) {
serverErrorMessage = (errorData.cause as QueryRangeErrorCauseType).error;
Copy link
Contributor

Choose a reason for hiding this comment

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

there should not be any type of assertion bad practice

ideally, this should be handled from central place

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Error type has a standard type in case of New Error() and the cause property type is set to unknown and we are setting cause to be an object with the error property. Hence this.

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

Successfully merging this pull request may close these issues.

None yet

3 participants