hunk.code_window:     INVALID_GIT_REPO(400, 4033, "The remote repo is not empty. Please create a new empty repo and configure the SSH keys. " +
               "If you want to clone from remote repo and build application, please use import application from git option.", AppsmithErrorAction.DEFAULT, null, ErrorType.GIT_CONFIGURATION_ERROR),
       DEFAULT_RESOURCES_UNAVAILABLE(400, 4034, "Unexpected state. Default resources are unavailable for {0} with id {1}. Please reach out to Appsmith customer support to resolve this.",
               AppsmithErrorAction.LOG_EXTERNALLY, null, ErrorType.BAD_REQUEST),
       GIT_FILE_SYSTEM_ERROR(400, 4035, "Error while accessing the file system. Details: {0}", AppsmithErrorAction.DEFAULT, null, ErrorType.GIT_CONFIGURATION_ERROR),
       GIT_MERGE_FAILED_REMOTE_CHANGES(406, 4036, "Remote is ahead of local by {0} commits on branch {1}. Please pull remote changes first and try again.", AppsmithErrorAction.DEFAULT, null, ErrorType.GIT_ACTION_EXECUTION_ERROR),
       GIT_MERGE_FAILED_LOCAL_CHANGES(406, 4037, "There are uncommitted changes present in your local branch {0}. Please commit them first and try again", AppsmithErrorAction.DEFAULT, null, ErrorType.GIT_ACTION_EXECUTION_ERROR),
       REMOVE_LAST_ORG_ADMIN_ERROR(400, 4038, "The last admin can not be removed from an organization", AppsmithErrorAction.DEFAULT, null, ErrorType.INTERNAL_ERROR),
       INVALID_CRUD_PAGE_REQUEST(400, 4039, "Unable to process page generation request, {0}", AppsmithErrorAction.DEFAULT, null, ErrorType.BAD_REQUEST),
  
hunk.labels: keep keep keep keep replace keep keep keep keep
hunk.file_path: app/server/appsmith-server/src/main/java/com/appsmith/server/exceptions/AppsmithError.java
hunk.type: replace
file: #!/bin/sh
  
  # This script is baked into the appsmith-editor Dockerfile and is used to boot Nginx when the Docker container starts
  # Refer: /app/client/Dockerfile
  set -o errexit
  set -o xtrace
  
  if [ -z "$APPSMITH_SERVER_PROXY_PASS" ]; then
    export APPSMITH_SERVER_PROXY_PASS='http://localhost:8080'
    echo "No explicit value for APPSMITH_SERVER_PROXY_PASS, using '$APPSMITH_SERVER_PROXY_PASS'."
  fi
  
  cp /nginx-root.conf.template /etc/nginx/nginx.conf
  
  if [ -f /nginx.conf.template ]; then
    # This is to support installations where the docker-compose.yml file would mount a template confi at this location.
    app_template=/nginx.conf.template
  elif [ -z "$APPSMITH_SSL_CERT_PATH" ]; then
    if [ -z "$APPSMITH_DOMAIN" ]; then
      export APPSMITH_DOMAIN=_
    fi
    app_template=/nginx-app-http.conf.template
  else
    if [ -z "$APPSMITH_DOMAIN" ]; then
      echo "APPSMITH_DOMAIN is required when SSL is enabled." >&2
      exit 2
    fi
    app_template=/nginx-app-https.conf.template
  fi
  
  cat "$app_template" \
    | envsubst "$(printf '$%s,' $(env | grep -Eo '^APPSMITH_[A-Z0-9_]+'))" \
    | sed -e 's|\${\(APPSMITH_[A-Z0-9_]*\)}||g' \
    | tee /etc/nginx/conf.d/default.conf
  
  exec nginx -g 'daemon off;'
  