error may be null