2021-02-26 23:34:50 +00:00
|
|
|
package scep
|
|
|
|
|
|
|
|
// Error is an SCEP error type
|
|
|
|
type Error struct {
|
|
|
|
// Type ProbType
|
|
|
|
// Detail string
|
2021-03-05 11:40:42 +00:00
|
|
|
Message string `json:"message"`
|
|
|
|
Status int `json:"-"`
|
2021-02-26 23:34:50 +00:00
|
|
|
// Sub []*Error
|
|
|
|
// Identifier *Identifier
|
|
|
|
}
|
|
|
|
|
|
|
|
// Error implements the error interface.
|
|
|
|
func (e *Error) Error() string {
|
|
|
|
// if e.Err == nil {
|
|
|
|
// return e.Detail
|
|
|
|
// }
|
2021-03-05 11:40:42 +00:00
|
|
|
return e.Message
|
2021-02-26 23:34:50 +00:00
|
|
|
}
|