Managing error if server returns empty response