mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-06-09 11:39:31 +08:00
fix: add error code
This commit is contained in:
@@ -203,12 +203,14 @@ const CommentItem = {
|
|||||||
})
|
})
|
||||||
showEditor.value = false
|
showEditor.value = false
|
||||||
toast.success('回复成功')
|
toast.success('回复成功')
|
||||||
|
} else if (res.status === 429) {
|
||||||
|
toast.error('回复过于频繁,请稍后再试')
|
||||||
} else {
|
} else {
|
||||||
toast.error('回复失败')
|
toast.error(`回复失败: ${res.status} ${res.statusText}`)
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.debug('Submit reply error', e)
|
console.debug('Submit reply error', e)
|
||||||
toast.error('回复失败')
|
toast.error(`回复失败: ${e.message}`)
|
||||||
} finally {
|
} finally {
|
||||||
isWaitingForReply.value = false
|
isWaitingForReply.value = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -397,11 +397,11 @@ export default {
|
|||||||
} else if (res.status === 429) {
|
} else if (res.status === 429) {
|
||||||
toast.error('评论过于频繁,请稍后再试')
|
toast.error('评论过于频繁,请稍后再试')
|
||||||
} else {
|
} else {
|
||||||
toast.error('评论失败')
|
toast.error(`评论失败: ${res.status} ${res.statusText}`)
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.debug('Post comment error', e)
|
console.debug('Post comment error', e)
|
||||||
toast.error('评论失败')
|
toast.error(`评论失败: ${e.message}`)
|
||||||
} finally {
|
} finally {
|
||||||
isWaitingPostingComment.value = false
|
isWaitingPostingComment.value = false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user