Rework all of the HTTP layer
At this point I have working login, I think, according to the MITMProxy work I've done, but haven't had a successful request so far.
This commit is contained in:
parent
c136ff102b
commit
b254472dcd
1 changed files with 0 additions and 26 deletions
26
db/errors.go
26
db/errors.go
|
|
@ -1,26 +0,0 @@
|
|||
package db
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"reflect"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
func LogErrorTypeInfo(err error) {
|
||||
if err == nil {
|
||||
log.Error().Msg("Error is nil")
|
||||
return
|
||||
}
|
||||
|
||||
// Log current error type
|
||||
errType := reflect.TypeOf(err)
|
||||
log.Warn().Err(err).Str("type", errType.String()).Str("pkgPath", errType.PkgPath()).Msg("Error type info")
|
||||
|
||||
// Recursively log wrapped errors
|
||||
wrappedErr := errors.Unwrap(err)
|
||||
if wrappedErr != nil {
|
||||
log.Info().Msg("Contains wrapped error")
|
||||
LogErrorTypeInfo(wrappedErr)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue