ServiceStack: how to deal with errors?

不想你离开。 提交于 2019-12-04 04:39:18

See ServiceStack's Validation and Error handling wiki page for more details about error handling and validation in ServiceStack.

At the moment there is no way to handle a serialization exception with Custom logic (although I will now add that on the TODO list :).

If your Response DTO has a ResponseStatus property (i.e. or inherits from IHasResponseStatus), ServiceStack should automatically serialize your exception.

To also get it to serialize your StackTrace set DebugMode to true with SetConfig() in your AppHost.Configure() onload script.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!