github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/api/cloudcontroller/ccerror/v3_job_failed_error.go (about)

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