SATOSA icon indicating copy to clipboard operation
SATOSA copied to clipboard

Context state keyError Exception message for humans

Open peppelinux opened this issue 5 years ago • 2 comments

This PR introduces a human readable message to Users when they gets SATOSA_BASE KeyError. Found it usefull to avoid weird Users open assistane tickets when they gets that "ermetic" error on the screen.

  • [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • [x] Have you added an explanation of what problem you are trying to solve with this PR?
  • [x] Have you added information on what your changes do and why you chose this as your solution?
  • [ ] Have you written new tests for your changes?
  • [x] Does your submission pass tests?
  • [x] This project follows PEP8 style guide. Have you run your code against the 'flake8' linter?

peppelinux avatar Apr 16 '20 14:04 peppelinux

While I'm in favor of a more helpful error message in the logs (or in a FAQ maybe), the current log entry is like it is addressed to the user and not the admin that will look at the error. In addition to that I think that it's better to handle error pages/redirects outside SATOSA to have less concerns and let the admin customize how they want to handle such cases

p.s: in the current commit while there's a redirect_url, it's not used anywhere

ioparaskev avatar Apr 21 '20 09:04 ioparaskev

Thank you John, you are proof of the existence of life here :')

What we would do to get this job done? My users now have something clear, a hint and we would also move to a better design, so I agree with you.

Would we instead use a redirect page? We should specialize another url for this case or reuse a more general one, like I did here: https://github.com/IdentityPython/SATOSA/pull/325

space for ideas, the integrations are often trivial

peppelinux avatar Apr 21 '20 10:04 peppelinux