Incorrect proxying of WebFaultException
See original GitHub issueI have custom WCF REST service, hosted in SharePoint. I’m using sp-rest-proxy to test application wich make a request to SharePoint REST API and this custom service.
Everything goes great unless WCR REST service throws an exception.
throw new WebFaultException<string>(ex.ToString(), HttpStatusCode.InternalServerError)
When this code executes, direct GET request returns string response with exception (ex.ToString()).
When I make request through proxy, I got json response with something like that:
{ "type": "Buffer", "data": [ 34, 83, 121, 115, 116, 101, 109, 46, 65, 114, 103, 117, 109, 101 ]}
It’s very inconvenient because I can’t test exception handling in developer enviroment with sp-rest-proxy, I need to deploy my application to test that behaviour. If it can be fixed, please do it. Thank you!
Issue Analytics
- State:
- Created 5 years ago
- Comments:19 (9 by maintainers)
Top GitHub Comments
Cool! Glad it works for you now. Please use the beta until I’ll publish the new version with latest tag after a little while.
Hey @koltyakov! Sorry, it was my fault. Double checked proxy config and realized I changed SharePoint address to another farm. Now it works perfectly! Many thanks, I think issue can be closed now.