Only print stack traces for 500 errors