Add exception handler for entire API.