return not found if rss feed not found

This commit is contained in:
Hongbo Wu 2023-07-20 14:21:36 +08:00
parent d572a9e3e4
commit 6004b51956

View file

@ -257,6 +257,11 @@ export const subscribeResolver = authorized<
}
} catch (error) {
log.error('failed to subscribe', error)
if (error instanceof Error && error.message === 'Status code 404') {
return {
errorCodes: [SubscribeErrorCode.NotFound],
}
}
return {
errorCodes: [SubscribeErrorCode.BadRequest],
}