3

Is there a built-in renderer for unhandled exceptions when using the RazorFormat plugin?

Our service is throwing an exception, but ServiceStack is rendering the corresponding Razor view anyway (just with empty data). I would have expected Razor to pick up the error in the ResponseStatus property and display something like ASP.Net's YSOD.

Edit: Our DebugMode on HostConfig is set to 'true'.

Sebastian Nemeth
  • 5,505
  • 4
  • 26
  • 36

1 Answers1

2

See this previous answer on getting Error Info from a Razor Page, e.g. You can short-cut your page to just display the Error message with:

@if (RenderErrorIfAny()) { return; }

You can also specify a custom fallback Razor Page for different Errors.

Community
  • 1
  • 1
mythz
  • 141,670
  • 29
  • 246
  • 390