fix response error treatment