Handle http 500 errors