Fondation
This commit is contained in:
parent
7967d2d9c5
commit
de64c10603
@ -174,11 +174,11 @@ export async function GET(request: Request) {
|
||||
);
|
||||
}
|
||||
|
||||
const contentType = createTokenResponse.headers.get('content-type') || '';
|
||||
if (!contentType.includes('application/json')) {
|
||||
const tokenContentType = createTokenResponse.headers.get('content-type') || '';
|
||||
if (!tokenContentType.includes('application/json')) {
|
||||
const errorText = await createTokenResponse.text().catch(() => 'Unknown error');
|
||||
logger.error('[ROCKET_CHAT_USER_TOKEN] Expected JSON, got HTML', {
|
||||
contentType,
|
||||
contentType: tokenContentType,
|
||||
errorPreview: errorText.substring(0, 200),
|
||||
});
|
||||
return NextResponse.json(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user