Fondation

This commit is contained in:
alma 2026-01-17 13:47:59 +01:00
parent 7967d2d9c5
commit de64c10603

View File

@ -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(