Skip to content

Commit 3ab498d

Browse files
authored
log patreon response (#1089)
1 parent 1a751e9 commit 3ab498d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

srv/api/user/patreon.ts

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { store } from '/srv/db'
77
import { command } from '/srv/domains'
88
import { sendOne } from '../ws'
99
import { getPatreonEntitledTierByCost } from '/common/util'
10+
import { logger } from '/srv/middleware'
1011

1112
export const patreon = {
1213
authorize,
@@ -35,6 +36,10 @@ async function authorize(code: string, refresh?: boolean) {
3536
})
3637

3738
if (result.statusCode && result.statusCode > 200) {
39+
logger.error(
40+
{ result: result.body, status: result.statusCode, message: result.statusMessage },
41+
'Patreon validation failed'
42+
)
3843
throw new StatusError(`Unable to verify Patreon account`, 400)
3944
}
4045

0 commit comments

Comments
 (0)