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

Return empty response when include fails #2846

Merged
merged 1 commit into from
Jan 26, 2018
Merged

Conversation

di
Copy link
Member

@di di commented Jan 26, 2018

Fixes #2843.

If the client side include fails for some reason, return an empty response. For example, if there is a permissions error, don't redirect to the login page, just show an empty view.

If the client side include fails for some reason, return an empty
response. For example, if there is a permissions error, don't redirect
to the login page, just show an empty view.
@di di force-pushed the fix-edit-project-button-include branch from 31372c6 to ea0844d Compare January 26, 2018 15:51
@di di merged commit 17401a1 into master Jan 26, 2018
@di di deleted the fix-edit-project-button-include branch January 26, 2018 16:07

resp = forbidden_include(exc, request)

assert resp.status_code == 200
Copy link
Member

Choose a reason for hiding this comment

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

Do we still want this to be a 403 response? I think the HTML include will work fine in either case, but it feels a little cleaner to keep the response code as 403 here? What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that makes sense.

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