mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
ErrorFallback: update discussion title to include error code and status if provided
This commit is contained in:
@@ -44,12 +44,21 @@ export function ErrorFallbackContents({
|
||||
size={props.basic ? "small" : "medium"}
|
||||
href={
|
||||
EXTERNAL_LINKS.gitHub +
|
||||
"/discussions/new?labels=bug&category=support-q-a&title=" +
|
||||
encodeURIComponent("Error: " + error.message.replace("\n", " ")) +
|
||||
"&body=" +
|
||||
encodeURIComponent(
|
||||
"👉 **Please describe how to reproduce this bug here.**"
|
||||
)
|
||||
"/discussions/new?" +
|
||||
new URLSearchParams({
|
||||
labels: "bug",
|
||||
category: "support-q-a",
|
||||
title: [
|
||||
"Error",
|
||||
(error as any).code,
|
||||
(error as any).status,
|
||||
error.message,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(": ")
|
||||
.replace(/\n/g, " "),
|
||||
body: "👉 **Please describe how to reproduce this bug here.**",
|
||||
}).toString()
|
||||
}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
|
||||
Reference in New Issue
Block a user