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

(low prio) unclear error shown in UI when action fields fails #2774

Open
2 tasks done
pjmuller opened this issue May 16, 2024 · 1 comment
Open
2 tasks done

(low prio) unclear error shown in UI when action fields fails #2774

pjmuller opened this issue May 16, 2024 · 1 comment
Labels

Comments

@pjmuller
Copy link

Describe the bug

When you introduce an error in a lambda part of the actions > fields, it will return an non descriptive error

Steps to Reproduce

Steps to reproduce the behavior:

  1. create an action
class Avo::Actions::MyAction < Avo::BaseAction
  self.name = "My Action"

  def fields
    field :my_field, as: :text, default: -> { 
        this_variable_doesnt_exist_and_will_throw_an_error
      }
  end
  1. open the action in the UI
  2. instead of seeing the modal you get a non descriptive error

Screenshot 2024-05-16 at 12 55 34

The problem seems to be that he loads http://localhost:3000/avo/failed_to_load?turbo_frame=actions_show&.... which does not play well with turboframes

(in the server logs you do see the original error)

Expected behavior & Actual behavior

see an error like undefined local variable or method this_variable_doesnt_exist_and_will_throw_an_error' for #<Avo::Actions::`

Impact

  • Low impact (It's really a tiny thing that I could live with.)

Urgency

  • Low urgency (It can wait. I just wanted you to know about it.)
Copy link
Contributor

github-actions bot commented Jun 1, 2024

This issue has been marked as stale because there was no activity for the past 15 days.

@github-actions github-actions bot added the Stale label Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant