Fixed error handling response