{"record":{"id":"6ec10f235f3f3d82","repo":"open-webui/open-webui","slug":"something-went-wrong-6ec10f","errorCode":null,"errorMessage":"Something went wrong :/","messagePattern":"Something went wrong :/","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"backend/open_webui/routers/channels.py","lineNumber":271,"sourceCode":"            db=db,\n        )\n\n        if channel:\n            participant_ids = [member.user_id for member in await Channels.get_members_by_channel_id(channel.id, db=db)]\n\n            await emit_to_users(\n                'events:channel',\n                {'data': {'type': 'channel:created'}},\n                participant_ids,\n            )\n            await enter_room_for_users(f'channel:{channel.id}', participant_ids)\n\n            return ChannelModel(**channel.model_dump())\n        else:\n            raise Exception('Error creating channel')\n    except Exception as e:\n        log.exception(e)\n        raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail=ERROR_MESSAGES.DEFAULT())\n\n\n############################\n# CreateNewChannel\n############################\n\n\n@router.post('/create', response_model=Optional[ChannelModel])\nasync def create_new_channel(\n    request: Request,\n    form_data: CreateChannelForm,\n    user=Depends(get_verified_user),\n    db: AsyncSession = Depends(get_async_session),\n):\n    await check_channels_access(request, user)\n\n    if form_data.type not in ['group', 'dm'] and user.role != 'admin':\n        # Only admins can create standard channels (joined by default)","sourceCodeStart":253,"sourceCodeEnd":289,"githubUrl":"https://github.com/open-webui/open-webui/blob/01f4282f1ffe0d6212f58d3afbeae21fffd0c4be/backend/open_webui/routers/channels.py#L253-L289","documentation":"Generic 400 Bad Request raised by the internal channel-creation helper in open-webui's channels router. Any exception thrown while inserting the channel row (or during the surrounding try block) is caught, logged via log.exception, and re-raised as HTTPException with ERROR_MESSAGES.DEFAULT(). The real root cause is only visible in the server logs, not the response body.","triggerScenarios":"POST to the internal channel creation path where Channels.insert_new_channel returns falsy (DB insert failed, constraint violation, async session in a bad state) or any awaited call inside the try (emit_to_users, enter_room_for_users) raises; the handler converts all of them into this 400.","commonSituations":"Database connectivity loss or migration drift (missing table/column after upgrading open-webui without running data migrations), invalid form payload that breaks the ORM model, Redis/socketio emission failure inside the try block masking the original error.","solutions":["Check the open-webui server logs: log.exception(e) prints the full traceback that was swallowed into the generic 400.","Verify the database schema matches the current open-webui version (run the container's data migration / start it once so alembic migrations apply).","Confirm the CreateChannelForm payload matches the API schema (name, type, access_grants types).","If emissions (socket/Redis) fail inside the try, fix the WEBUI_AUTH/websocket config so emit_to_users and enter_room_for_users succeed."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const channel = await api.post('/api/v1/channels/', payload);\n} catch (e) {\n  if (e.status === 400 && e.detail === 'Something went wrong :/') {\n    // generic wrapper: inspect open-webui server logs for the real traceback\n    console.error('Channel insert failed; check server logs');\n  }\n  throw e;\n}","preventionTips":["Run open-webui DB migrations immediately after every version upgrade.","Keep the creation payload minimal and schema-valid (name, type, access_grants).","Monitor server logs whenever a generic 400 appears — the detail string never contains the cause."],"tags":["open-webui","channels","http-400","database","generic-error"],"backgroundTag":null,"analyzedSha":"01f4282f1ffe0d6212f58d3afbeae21fffd0c4be","analyzedAt":"2026-08-14T18:25:22.715Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}