@@ -10,6 +10,7 @@ import (
10
10
"github.com/mocha-bot/mochus/config"
11
11
"github.com/mocha-bot/mochus/core/entity"
12
12
repository "github.com/mocha-bot/mochus/core/repository/discord"
13
+ zLog "github.com/rs/zerolog/log"
13
14
)
14
15
15
16
type discordRepository struct {
@@ -56,6 +57,7 @@ func (d *discordRepository) GetToken(ctx context.Context, code, requestURL strin
56
57
}
57
58
58
59
if resp .StatusCode == http .StatusBadRequest {
60
+ zLog .Error ().Err (err ).Interface ("response" , resp ).Str ("function" , "GetToken" ).Msg ("error bad request" )
59
61
return nil , fmt .Errorf ("%w: %v" , entity .ErrorBadRequest , response .HTTPResponse .Error )
60
62
}
61
63
@@ -96,6 +98,7 @@ func (d *discordRepository) GetTokenByRefresh(ctx context.Context, refreshToken
96
98
}
97
99
98
100
if resp .StatusCode == http .StatusBadRequest {
101
+ zLog .Error ().Err (err ).Interface ("response" , resp ).Str ("function" , "GetTokenByRefresh" ).Msg ("error bad request" )
99
102
return nil , fmt .Errorf ("%w: %v" , entity .ErrorBadRequest , response .HTTPResponse .Error )
100
103
}
101
104
@@ -130,6 +133,7 @@ func (d *discordRepository) RevokeToken(ctx context.Context, request *entity.Rev
130
133
}
131
134
132
135
if resp .StatusCode == http .StatusBadRequest {
136
+ zLog .Error ().Err (err ).Interface ("response" , resp ).Str ("function" , "RevokeToken" ).Msg ("error bad request" )
133
137
return fmt .Errorf ("%w: %v" , entity .ErrorBadRequest , response .HTTPResponse .Error )
134
138
}
135
139
0 commit comments