Improve SCEP API logic and error handling

This commit is contained in:
Herman Slatman 2021-02-27 00:34:50 +01:00
parent a6d50f2fa0
commit 2fc5a7f22e
No known key found for this signature in database
GPG key ID: F4D8A44EA0A75A4F
4 changed files with 146 additions and 103 deletions

19
scep/errors.go Normal file
View 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()
}