All Downloads are FREE. Search and download functionalities are using the official Maven repository.

marquez.api.exceptions.RunAlreadyExistsException Maven / Gradle / Ivy

There is a newer version: 0.49.0
Show newest version
/*
 * Copyright 2018-2023 contributors to the Marquez project
 * SPDX-License-Identifier: Apache-2.0
 */

package marquez.api.exceptions;

import static com.google.common.base.Preconditions.checkNotNull;

import javax.ws.rs.BadRequestException;
import marquez.common.models.JobName;
import marquez.common.models.NamespaceName;
import marquez.common.models.RunId;

public final class RunAlreadyExistsException extends BadRequestException {
  private static final long serialVersionUID = 1L;

  public RunAlreadyExistsException(
      final NamespaceName namespaceName, final JobName jobName, final RunId id) {
    super(
        String.format(
            "Run '%s' already exists for '%s' under namespace '%s'.",
            checkNotNull(id).getValue(),
            checkNotNull(jobName).getValue(),
            checkNotNull(namespaceName).getValue()));
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy