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
|
||||
type Error struct {
|
||||
Err error
|
||||
DebugMessage string
|
||||
FriendlyMessage string
|
||||
}
|
||||
|
||||
func (e *Error) printFriendlyMessage() {
|
||||
log.Infoln(e.FriendlyMessage)
|
||||
}
|
||||
|
||||
func (e *Error) printDebuError() {
|
||||
log.Debugln(e.Err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user