Class BigqueryJobFailureException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
google.registry.bigquery.BigqueryJobFailureException
All Implemented Interfaces:
Serializable

public final class BigqueryJobFailureException extends RuntimeException
Generic exception to throw if a Bigquery job fails.
See Also:
  • Constructor Details

    • BigqueryJobFailureException

      public BigqueryJobFailureException(String message, @Nullable Throwable cause, @Nullable com.google.api.services.bigquery.model.JobStatus jobStatus, @Nullable com.google.api.client.googleapis.json.GoogleJsonError jsonError)
  • Method Details

    • create

      public static BigqueryJobFailureException create(IOException cause)
      Delegate IOException errors, checking for GoogleJsonResponseException
    • create

      public static BigqueryJobFailureException create(com.google.api.client.googleapis.json.GoogleJsonResponseException cause)
      Create an error for JSON server response errors.
    • create

      public static BigqueryJobFailureException create(com.google.api.services.bigquery.model.JobStatus jobStatus)
      Create an error from a failed job.
    • getReason

      public String getReason()
      Returns a short error code describing why this job failed.

      Sample Reasons:

      • "duplicate": The table you're trying to create already exists.
      • "invalidQuery": Query syntax error of some sort.
      • "unknown": Non-Bigquery errors.
      See Also:
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable