mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
17 lines
326 B
Go
17 lines
326 B
Go
package client
|
|
|
|
import "fmt"
|
|
|
|
// GenericError represents the body of a generic error returned by the Portainer API
|
|
type GenericError struct {
|
|
Err string
|
|
Details string
|
|
}
|
|
|
|
func (e *GenericError) Error() string {
|
|
if e.Details != "" {
|
|
return fmt.Sprintf("%s: %s", e.Err, e.Details)
|
|
}
|
|
return fmt.Sprintf("%s", e.Err)
|
|
}
|