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

JQ fromdate error gets cut off in page editor #3216

Closed
twschiller opened this issue Apr 20, 2022 · 4 comments · Fixed by #3336
Closed

JQ fromdate error gets cut off in page editor #3216

twschiller opened this issue Apr 20, 2022 · 4 comments · Fixed by #3336
Assignees
Labels
bug Something isn't working low priority triage
Milestone

Comments

@twschiller
Copy link
Contributor

twschiller commented Apr 20, 2022

Steps to reproduce

  • Add a jq brick with filter "" | fromdate
  • JQ will throw the error does not match format "%Y-%m-%dT%H:%M:%SZ"
  • The side panel will show the error as %SZ"

It looks like it also gets cut off in the console log of the error

Depending on what the problem is/how hard it is to fix, we can determine prioritization

@twschiller twschiller added the bug Something isn't working label Apr 20, 2022
@twschiller twschiller added this to the 1.6.1 milestone Apr 20, 2022
@twschiller twschiller changed the title PLACEHOLDER: JQ fromdate error gets cut off in page editor JQ fromdate error gets cut off in page editor Apr 20, 2022
@BALEHOK
Copy link
Contributor

BALEHOK commented May 2, 2022

It is JQ library that cuts the error message.
At this point the error is as follows:

{
  message: "%SZ\"",
  stack: "jq: error (at <stdin>:0): date \"\" does not match format \"%Y-%m-%dT%H:%M:%SZ\"\n"
}

We probably can:

  • match the exact message and return a predefined error text in this case
  • try to match weird error messages, like with length <= 10 chars or so, and return (parsed) stack trace

@twschiller
Copy link
Contributor Author

twschiller commented May 2, 2022

@BALEHOK Thanks for investigating. Can you open an issue with the jq-web project?

For our purposes, I think it'd be good to use a regex to match jq: error (at <stdin>:0): .* and grab the raw error message. (trimming the newlines If that pattern doesn't match, we can fall back to the message

@twschiller twschiller modified the milestones: 1.6.1, 1.6.2 May 2, 2022
@BALEHOK
Copy link
Contributor

BALEHOK commented May 3, 2022

While fixing this bumped into another issue. If an error is not serializable and it makes its way to Logs, redux constantly complains about non-serializable value in the store, clogs the console output, and kills CPU.

image

@BALEHOK
Copy link
Contributor

BALEHOK commented May 4, 2022

Opened the issue with jq-web fiatjaf/jq-web#24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low priority triage
Development

Successfully merging a pull request may close this issue.

2 participants