Skip to content

Unpublished pages throws 500 error #1915

Answered by tidyui
vindhya124 asked this question in General
Discussion options

You must be logged in to vote

This is actually handled for Razor Pages here:

https://github.com/PiranhaCMS/piranha.core/blob/master/core/Piranha.AspNetCore/Models/SinglePage.cs#L62

But we might add logic for it earlier in the routing as well. Right now you can solve it in you controllers by returning NotFound when the model loader returns null.

Best regards

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tidyui
Comment options

Answer selected by vindhya124
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants