use different labels for porn
and sexual
(#3282)
* use different labels for `porn` and `sexual` * newline
This commit is contained in:
parent
bdf77f8548
commit
a90566d864
2 changed files with 9 additions and 5 deletions
|
@ -46,7 +46,7 @@ export function FeedErrorMessage({
|
|||
if (
|
||||
typeof knownError !== 'undefined' &&
|
||||
knownError !== KnownError.Unknown &&
|
||||
feedDesc.startsWith('feedgen')
|
||||
(feedDesc.startsWith('feedgen') || knownError === KnownError.FeedNSFPublic)
|
||||
) {
|
||||
return (
|
||||
<FeedgenErrorMessage
|
||||
|
@ -240,6 +240,9 @@ function detectKnownError(
|
|||
if (typeof error !== 'string') {
|
||||
error = error.toString()
|
||||
}
|
||||
if (error.includes(KnownError.FeedNSFPublic)) {
|
||||
return KnownError.FeedNSFPublic
|
||||
}
|
||||
if (!feedDesc.startsWith('feedgen')) {
|
||||
return KnownError.Unknown
|
||||
}
|
||||
|
@ -263,8 +266,5 @@ function detectKnownError(
|
|||
if (error.includes('feed provided an invalid response')) {
|
||||
return KnownError.FeedgenBadResponse
|
||||
}
|
||||
if (error.includes(KnownError.FeedNSFPublic)) {
|
||||
return KnownError.FeedNSFPublic
|
||||
}
|
||||
return KnownError.FeedgenUnknown
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue