Improve SCEP API logic and error handling
This commit is contained in:
parent
a6d50f2fa0
commit
2fc5a7f22e
4 changed files with 146 additions and 103 deletions
19
scep/errors.go
Normal file
19
scep/errors.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package scep
|
||||
|
||||
// Error is an SCEP error type
|
||||
type Error struct {
|
||||
// Type ProbType
|
||||
// Detail string
|
||||
Err error
|
||||
Status int
|
||||
// Sub []*Error
|
||||
// Identifier *Identifier
|
||||
}
|
||||
|
||||
// Error implements the error interface.
|
||||
func (e *Error) Error() string {
|
||||
// if e.Err == nil {
|
||||
// return e.Detail
|
||||
// }
|
||||
return e.Err.Error()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue