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

Unfriendly error thrown if you try to publish api backend changes in admin without checking any #307

Closed
GUI opened this issue Jan 8, 2016 · 1 comment

Comments

@GUI
Copy link
Member

GUI commented Jan 8, 2016

  • In the admin, modify an API backend so there are pending changes to publish.
  • Head to the Publish Changes screen.
  • Make sure none of the checkboxes are checked (no checkboxes will be checked by default if you have multiple pending changes, but if there's just a single pending change, it will be checked by default).
  • Hit the big "Publish" button.
  • You'll get this unfriendly error that doesn't really explain things:
    screen shot 2016-01-08 at 10 45 49 am

This only happens if you haven't checked any checkboxes, so it's usually pretty easy to catch, but the error should explain what's going on and maybe prevent the publish button from even being active until you check something.

This scenario also triggers an uncaught exception on the backend publish API (Pundit::AuthorizationNotPerformedError) that would be good to cleanup.

@GUI GUI added the bug label Jan 8, 2016
GUI added a commit to NREL/api-umbrella that referenced this issue Apr 30, 2016
Hitting the publish API without any selected changes now performs no
action. The publish button is also now disabled in the UI until the user
checks at least one checkbox.

See 18F/api.data.gov#307
@GUI
Copy link
Member Author

GUI commented May 4, 2016

This has been fixed (NREL/api-umbrella@f0b9315) and pushed live. The publish button is no longer clickable until you check at least one item. The underlying API also no longer errors out if no items are selected for publishing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant