mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 04:39:58 +00:00
api/url: return friendly name in unsupported link error
This commit is contained in:
parent
97fb6e60a2
commit
c71ed59660
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ import { strict as assert } from "node:assert";
|
|||
|
||||
import { env } from "../config.js";
|
||||
import { services } from "./service-config.js";
|
||||
import { friendlyServiceName } from "./service-alias.js";
|
||||
|
||||
function aliasURL(url) {
|
||||
assert(url instanceof URL);
|
||||
|
@ -186,7 +187,7 @@ export function extract(url) {
|
|||
return {
|
||||
error: "link.unsupported",
|
||||
context: {
|
||||
service: host
|
||||
service: friendlyServiceName(host),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue