-
Notifications
You must be signed in to change notification settings - Fork 934
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#175352747](https://www.pivotaltracker.com/story/show/175352747) Co-authored-by: Lisa Burns <[email protected]>
- Loading branch information
Showing
6 changed files
with
85 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package ccerror | ||
|
||
import ( | ||
"fmt" | ||
) | ||
|
||
// V3JobFailedError represents a failed Cloud Controller Job. It wraps the error | ||
// returned back from the Cloud Controller. | ||
type JobFailedNoErrorError struct { | ||
JobGUID string | ||
} | ||
|
||
func (e JobFailedNoErrorError) Error() string { | ||
return fmt.Sprintf("Job (%s) failed with no error. This is unexpected, contact your operator for details.", e.JobGUID) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package translatableerror | ||
|
||
// RevisionAmbiguousError is returned when multiple revisions with the same | ||
// version are returned | ||
type JobFailedNoErrorError struct { | ||
JobGUID string | ||
} | ||
|
||
func (e JobFailedNoErrorError) Error() string { | ||
return "Job {{.JobGUID}} failed with no error. This is unexpected, contact your operator for details." | ||
} | ||
|
||
func (e JobFailedNoErrorError) Translate(translate func(string, ...interface{}) string) string { | ||
return translate(e.Error(), map[string]interface{}{ | ||
"JobGUID": e.JobGUID, | ||
}) | ||
} |