merge: Fix error message when a peertube object is rejected for bad ID / URL (!900)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/900 Approved-by: dakkar <dakkar@thenautilus.net> Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
commit
3dfd018305
1 changed files with 1 additions and 1 deletions
|
@ -26,6 +26,6 @@ export function assertActivityMatchesUrls(activity: IObject, urls: string[]) {
|
||||||
.map(u => new URL(u as string).href);
|
.map(u => new URL(u as string).href);
|
||||||
|
|
||||||
if (!actualUrls.some(u => expectedUrls.has(u))) {
|
if (!actualUrls.some(u => expectedUrls.has(u))) {
|
||||||
throw new UnrecoverableError(`bad Activity: neither id(${activity.id}) nor url(${JSON.stringify(activity.url)}) match location(${urls})`);
|
throw new UnrecoverableError(`bad Activity: neither id nor url (${actualUrls.join(', ')}) match location (${urls.join(', ')})`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue