element-hq / element-hq/element-web

Better error message when the server doesn't support URL previews

Open
#34,931 3 comments 0 reactions 1 assignee Claimed by @daniellekirkwood View on GitHub
A-URL-Previews O-Occasional S-Minor T-Enhancement X-Blocked X-Spec-Changes
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Your use case

#### What would you like to do?

When a homeserver doesn't support URL previews (`GET /_matrix/client/v1/media/preview_url` returns 404), Element should help the user understand this.

#### Why would you like to do it?

Currently you get an unhelpfully generic error message:

Image

which would make me think that either my client or server is broken.

#### How would you like to achieve it?

Ideally Element could detect support for the /preview\_url endpoint and disable the settings switch for URL previews accordingly.

### Have you considered any alternatives?

Just show a clearer error message in the composer case the /preview\_url endpoint returns 404.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by locating the URL preview request for GET /_matrix/client/v1/media/preview_url and the settings switch or composer error handling that uses it. Confirm the 404 behavior, then make the unsupported-server state clear through the settings or composer path; done means users no longer see a generic error when URL previews are unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.