question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect proxying of WebFaultException

See original GitHub issue

I 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:closed
  • Created 5 years ago
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
koltyakovcommented, Oct 9, 2018

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.

1reaction
NZainchkovskiycommented, Oct 9, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Handle WebFaultException to return CustomException?
I have two services, REST and SOAP. For SOAP services, I don't have any problem on throwing my custom exception. But in REST,...
Read more >
WCF REST tip 2: WebFaultException | Pieter De Rycke's Blog
Introduction SOAP supports propagating exceptions from the service to the client. This is called “faults” and in WCF this is represented by ...
Read more >
How do I get errors back from REST service using WebClient?
I have a service that I call from Silverlight. It is both WCF and REST. My Silverlight client calls it fine, however, when...
Read more >
How to solve the problem that the client webchannelfactory cannot ...
But the best way is to implement such a process by writing a webchannelfactory (which is actually a proxy to work) similar class...
Read more >
WCF REST Exception handling - it's a code thing
As soon as a WCF REST service throws a WebFaultException with a fault ... So it seems like you have to solve this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found