| ... | @@ -273,7 +273,7 @@ pub fn Handlers(comptime T: type) type { | ... | @@ -273,7 +273,7 @@ pub fn Handlers(comptime T: type) type { |
| 273 | try req.do(.POST, headers, try params.encode()); | 273 | try req.do(.POST, headers, try params.encode()); |
| 274 | const r = req.reader(); | 274 | const r = req.reader(); |
| 275 | const body_content = try r.readAllAlloc(alloc, 1024 * 1024 * 5); | 275 | const body_content = try r.readAllAlloc(alloc, 1024 * 1024 * 5); |
| 276 | if (req.status != .ok) std.log.scoped(.oauth).debug("{s}", .{body_content}); | 276 | if (req.status != .ok) std.log.scoped(.oauth).debug("{s}: {s}", .{ @tagName(req.status), body_content }); |
| 277 | if (req.status != .ok) return error.OauthBadToken; | 277 | if (req.status != .ok) return error.OauthBadToken; |
| 278 | const val = try extras.parse_json(alloc, body_content); | 278 | const val = try extras.parse_json(alloc, body_content); |
| 279 | | 279 | |
| ... | @@ -287,7 +287,7 @@ pub fn Handlers(comptime T: type) type { | ... | @@ -287,7 +287,7 @@ pub fn Handlers(comptime T: type) type { |
| 287 | try req2.do(.GET, headers2, null); | 287 | try req2.do(.GET, headers2, null); |
| 288 | const r2 = req2.reader(); | 288 | const r2 = req2.reader(); |
| 289 | const body_content2 = try r2.readAllAlloc(alloc, 1024 * 1024 * 5); | 289 | const body_content2 = try r2.readAllAlloc(alloc, 1024 * 1024 * 5); |
| 290 | if (req2.status != .ok) std.log.scoped(.oauth).debug("{s}", .{body_content2}); | 290 | if (req2.status != .ok) std.log.scoped(.oauth).debug("{s}: {s}", .{ @tagName(req2.status), body_content2 }); |
| 291 | if (req2.status != .ok) return error.OauthBadUserinfo; | 291 | if (req2.status != .ok) return error.OauthBadUserinfo; |
| 292 | const val2 = try extras.parse_json(alloc, body_content2); | 292 | const val2 = try extras.parse_json(alloc, body_content2); |
| 293 | | 293 | |