add some debugging to track down what type of exception is being raised in production