What is the equivalent to SoapExtension for JSON WebMethods?
<p>I've a few web methods that I use to call some external services like the Google Calendar API, obviously these can be extremely brittle.</p>

<p>Unfortunately I now realise that any error thrown on these methods are not causing an exception to bubble up to Global.asax which is where errors are getting logged in this application.</p>

<p>I have seen suggestions to wrap the method in a try/catch, which is a stupid way of doing it as there are a variety of errors that ASP.Net will silently swallow still.</p>

<p>In trying to find a solution I've seen a lot of references to <code>SoapExtension</code>, which is exactly what I want to do but doesn't get fired as I'm returning Json. What I really want is a way to catch the error just like that.</p>

<p>Any pointers appreciated, I still can't understand how the ASP.Net team could have thought that silently swallowing errors like this was a bright idea.</p>

<p>So for example a method like this:</p>

<pre><code>    [WebMethod]
    [ExceptionHandling] //can I write a handler like this to catch exceptions from JSON webservices?
    static public void DeleteItem(string id)
    {
        var api = new GoogleCalendarAPI(User.InternalUser());
        api.DeleteEvent(id);
        return "success";
    }
</code></pre>
