Skip to content

HTTP Redirect page on UnknowError Exception #325

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

Closed

Conversation

peppelinux
Copy link
Member

This PR introduces a new proxy_config.yml parameter called UNKNOW_ERROR_REDIRECT_PAGE, a possibility to redirect to that page all the Users that gets UnknowError Exception in the Http Response.

  • Added a UnknownSystemEntity message for humans in satosa.base (We should also use a settings_messages.py file and import them all from there if you agree)
  • Added exceptions.SATOSAUnknownErrorRedirectUrl
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you added an explanation of what problem you are trying to solve with this PR?
  • 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?
  • Does your submission pass tests?
  • This project follows PEP8 style guide. Have you run your code against the 'flake8' linter?

@peppelinux
Copy link
Member Author

this is another place where a redirect page could be useful

if ".." in path or path == "":

@@ -250,12 +250,21 @@ def run(self, context):
msg = "configuration error: unknown system entity " + str(err)
logline = lu.LOG_FMT.format(id=lu.get_session_id(context.state), message=msg)
logger.error(logline, exc_info=False)
raise
raise UnknownSystemEntity(("Unknown System Entity ID - please check "
Copy link
Member Author

Choose a reason for hiding this comment

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

@c00kiemon5ter Would you prefer that this code would be committed in a separate PR?

@c00kiemon5ter
Copy link
Member

closed by d986464

@peppelinux
Copy link
Member Author

See my comment here
#363 (comment)

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

Successfully merging this pull request may close these issues.

2 participants