-
Notifications
You must be signed in to change notification settings - Fork 82
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
Provide a more informative error message when navigating to Not Available able resources #427
Conversation
Could you add a screenshot of what this looks like? This is simpler so shouldn't be a problem to merge it :) |
Actually I've just noticed, it looks like you added the text to the wrong view. We want to modify |
Yes you were right. I didn't understand the issue previously and on finding an empty Http404 object, I had added the message in it without giving a thought.
I think the only way was to override the |
Taking a test case, I have put the status of the Partner with The (1) If the user is (2) In case a normal user or coordinator goes to Though if anyone access it directly through url, and goes to before my changes it shows the normal 404 page. And after adding the changes I have made it will show the custom error message. |
Great job figuring this out! One question - does this show the same message if a user attempts to navigate to, say, |
Hello @Samwalton9 currently it is showing the same message for
What should be the ideal behaviour in this case? |
Ideally, yes. That's a 'true' 404 because there actually isn't anything there. Is there an obvious way to handle this case? |
Yes, I think adding an extra check in
pointing out such cases really makes things much more interesting, helped me to get a more clear view about the issue. Thanks :D |
Very nicely implemented! This looks good to go to me, but I'll leave it to @jsnshrmn as to when this should be merged. Per my comment on another PR, we have quite a few big moving pieces right now so I'm not sure if merging this to master right now is a good idea. |
Thank you :)
Okay, no problem :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should raise a 403 instead of a 404.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for working on this, looks good! One tiny little thing for you to take a look inline.
made changes according to your suggestions, thank you :) |
Hello @lalit97! A test is failing due to the changes you made. I think you just need to change |
…able resources when navigating to a Not Available partner. Instead of raising a generic "Not found" error, we should explain that this partner isn't currently open for applications. Bug: T212767
Thank you for the review @suecarmol. I have fixed the test. Your suggestion made it very easy for me :) |
thanks for your contributions @lalit97! |
my pleasure as always :) Thank you :) |
when navigating to a Not Available partner. Instead of raising a generic "Not found" error, we should explain that this partner isn't currently open for applications.
Bug: T212767