open-webui/open-webui · error · HTTPException
Something went wrong :/
Error message
Something went wrong :/
What it means
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.
Source
Thrown at backend/open_webui/routers/channels.py:271
db=db,
)
if channel:
participant_ids = [member.user_id for member in await Channels.get_members_by_channel_id(channel.id, db=db)]
await emit_to_users(
'events:channel',
{'data': {'type': 'channel:created'}},
participant_ids,
)
await enter_room_for_users(f'channel:{channel.id}', participant_ids)
return ChannelModel(**channel.model_dump())
else:
raise Exception('Error creating channel')
except Exception as e:
log.exception(e)
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail=ERROR_MESSAGES.DEFAULT())
############################
# CreateNewChannel
############################
@router.post('/create', response_model=Optional[ChannelModel])
async def create_new_channel(
request: Request,
form_data: CreateChannelForm,
user=Depends(get_verified_user),
db: AsyncSession = Depends(get_async_session),
):
await check_channels_access(request, user)
if form_data.type not in ['group', 'dm'] and user.role != 'admin':
# Only admins can create standard channels (joined by default)View on GitHub (pinned to 01f4282f1f)
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.
Defensive patterns
Strategy: try-catch
Try / catch
try {
const channel = await api.post('/api/v1/channels/', payload);
} catch (e) {
if (e.status === 400 && e.detail === 'Something went wrong :/') {
// generic wrapper: inspect open-webui server logs for the real traceback
console.error('Channel insert failed; check server logs');
}
throw e;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Transcription failed.
- Something went wrong :/
- Error deleting folder
- Internal Server Error
- Database not ready
AI-assisted analysis of open-webui/open-webui@01f4282f1f (2026-08-14).
Data as JSON: /api/errors/6ec10f235f3f3d82.
Report an issue: GitHub.