Normalize error from api