api/url: return friendly name in unsupported link error

This commit is contained in:
wukko 2024-09-01 15:51:35 +06:00
parent 97fb6e60a2
commit c71ed59660
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -3,6 +3,7 @@ import { strict as assert } from "node:assert";
import { env } from "../config.js"; import { env } from "../config.js";
import { services } from "./service-config.js"; import { services } from "./service-config.js";
import { friendlyServiceName } from "./service-alias.js";
function aliasURL(url) { function aliasURL(url) {
assert(url instanceof URL); assert(url instanceof URL);
@ -186,7 +187,7 @@ export function extract(url) {
return { return {
error: "link.unsupported", error: "link.unsupported",
context: { context: {
service: host service: friendlyServiceName(host),
} }
}; };
} }