github.com/jenspinney/cli@v6.42.1-0.20190207184520-7450c600020e+incompatible/api/cloudcontroller/ccerror/v3_job_failed_error.go (about)

     1  package ccerror
     2  
     3  import (
     4  	"fmt"
     5  )
     6  
     7  // V2JobFailedError represents a failed Cloud Controller Job. It wraps the error
     8  // returned back from the Cloud Controller.
     9  type V3JobFailedError struct {
    10  	JobGUID string
    11  
    12  	// Code is a numeric code for this error.
    13  	Code int64 `json:"code"`
    14  	// Detail is a verbose description of the error.
    15  	Detail string `json:"detail"`
    16  	// Title is a short description of the error.
    17  	Title string `json:"title"`
    18  }
    19  
    20  func (e V3JobFailedError) Error() string {
    21  	return fmt.Sprintf("Job (%s) failed: %s", e.JobGUID, e.Detail)
    22  }