diff --git a/gitlab/functions.sh b/gitlab/functions.sh
index 9a168efd2c84b0b16b204caa0bc7883c70690bda..4769dbf33b795f30d254235974f66653bc1d14ff 100644
--- a/gitlab/functions.sh
+++ b/gitlab/functions.sh
@@ -94,14 +94,7 @@ doc_upload() {
   check_env DOCSERVER
   check_pass DOCUSER
   check_pass DOCPASS
-  log_info "${1} -> ${DOCSERVER}/${2}, via curl..."
-  curl --location --silent --show-error --user "${DOCUSER}:${DOCPASS}" --upload-file ${1} ${DOCSERVER}/${2}
-  local status=$?
-  if [ ${status} != 0 ]; then
-    log_error "Curl command finished with an error condition (status=${status})"
-    exit ${status}
-  fi
-  log_info "Successfully uploaded ${1} with curl"
+  run_cmd curl --location --silent --show-error --user "${DOCUSER}:${DOCPASS}" --upload-file ${1} ${DOCSERVER}/${2}
 }
 
 check_env PYTHON_VERSION