mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
modify error model
This commit is contained in:
@@ -5,10 +5,13 @@ import log "github.com/sirupsen/logrus"
|
|||||||
// Custom error type so that we can give helpful messages in CLI
|
// Custom error type so that we can give helpful messages in CLI
|
||||||
type Error struct {
|
type Error struct {
|
||||||
Err error
|
Err error
|
||||||
DebugMessage string
|
|
||||||
FriendlyMessage string
|
FriendlyMessage string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Error) printFriendlyMessage() {
|
func (e *Error) printFriendlyMessage() {
|
||||||
log.Infoln(e.FriendlyMessage)
|
log.Infoln(e.FriendlyMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (e *Error) printDebuError() {
|
||||||
|
log.Debugln(e.Err)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user