mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-12 00:06:14 +00:00
add catch (#5375)
This commit is contained in:
@@ -247,11 +247,14 @@
|
||||
<Button
|
||||
disabled={!$enterpriseLicense}
|
||||
on:click={async (e) => {
|
||||
const res = await SettingService.testMetadata({
|
||||
requestBody: $values[setting.key]
|
||||
})
|
||||
sendUserToast(`Metadata valid, see console for full content`)
|
||||
console.log(`Metadata content:`, res)
|
||||
try {
|
||||
const res = await SettingService.testMetadata({
|
||||
requestBody: $values[setting.key]
|
||||
})
|
||||
sendUserToast(`Metadata valid: ${res}`)
|
||||
} catch (error) {
|
||||
sendUserToast(`Invalid metadata`, true, error.message)
|
||||
}
|
||||
}}>Test content/url</Button
|
||||
>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user