Skip to content

Commit

Permalink
fix unknown error message
Browse files Browse the repository at this point in the history
  • Loading branch information
emilwareus committed Dec 12, 2023
1 parent 78976e8 commit 0911e21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion internal/resolution/pm/util/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ type PMJobError struct {
}

var InstalLPrivateDependencyMessage = "If this is a private dependency, please make sure that the debricked CLI has access to install it or pre-install it before running the debricked CLI."
var UnknownError = "No specific documentation for this problem yet. If you would like this message to more informative for this error, please create an issue here: https://github.com/debricked/cli/issues"

func (e PMJobError) Error() string {
return e.err
Expand Down Expand Up @@ -45,7 +46,7 @@ func NewPMJobError(err string) *PMJobError {
return &PMJobError{
err: err,
cmd: "",
doc: "No specific documentation for this problem yet. If you would like this message to more informative for this error, please create an issue here: https://github.com/debricked/cli/issues",
doc: UnknownError,
status: "",
}
}
2 changes: 1 addition & 1 deletion internal/resolution/pm/util/error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func TestNewError(t *testing.T) {
assert.Equal(t, string(""), jobError.cmd)
assert.Equal(
t,
string("No specific documentation for this problem yet, please report it to us! :)"),
UnknownError,
jobError.doc,
)
assert.Equal(t, string(""), jobError.status)
Expand Down

0 comments on commit 0911e21

Please sign in to comment.