log 400 and 500 errors