Skip to content

fix: report an invalid syndicator URL instead of throwing - #931

Merged
paulrobertlloyd merged 1 commit into
mainfrom
fix/syndicator-info-getter-errors
Sep 7, 2026
Merged

paulrobertlloyd merged 1 commit into
mainfrom
fix/syndicator-info-getter-errors

Conversation

@rmdes

@rmdes rmdes commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Fixes #930.

  • syndicator-mastodon and syndicator-bluesky: info returns error: "Valid server URL required" / "Valid profile URL required" for an unparseable URL, alongside checked and service, instead of throwing TypeError: Invalid URL.
  • endpoint-micropub: getConfig leaves out a target whose info throws; getSyndicateToProperty skips it. Guards for third-party syndicators that still throw.
  • endpoint-posts: getSyndicateToItems shows such a target disabled with the error message as its hint, using the plug-in’s name as label. info is now read once per target.
  • Tests in all four packages; each fails before the fix (TypeError: Invalid URL in the syndicators, an uncaught throw in the consumers).

Verified locally: syndicator-mastodon 38/38, syndicator-bluesky 40/40, endpoint-micropub 148/148, endpoint-posts 33/33; eslint and prettier clean.

Reading a Mastodon or Bluesky syndicator’s info threw on an invalid URL,
which failed every Micropub create, the config query and the post form.
Report it through info.error, as a missing username already is, and make
the endpoints that read info tolerate a target that still throws.

Fixes #930
@rmdes rmdes added the plugin-endpoint Endpoint plug-in label Sep 7, 2026
@paulrobertlloyd
paulrobertlloyd merged commit f553c34 into main Sep 7, 2026
1 check passed
@paulrobertlloyd
paulrobertlloyd deleted the fix/syndicator-info-getter-errors branch September 7, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin-endpoint Endpoint plug-in

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A syndicator with an invalid URL breaks the Micropub endpoint and the post editor

2 participants