We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f42c53 commit 1836f90Copy full SHA for 1836f90
packages/yasgui/src/TabSettingsModal.ts
@@ -619,10 +619,20 @@ export default class TabSettingsModal {
619
}
620
621
// Validate URL format
622
+ // Check for supported protocol first
623
+ if (!/^https?:\/\//i.test(endpoint)) {
624
+ alert("Endpoint URL must start with http:// or https://");
625
+ return;
626
+ }
627
try {
628
new URL(endpoint);
629
} catch (e) {
- alert("Please enter a valid URL.");
630
+ // Show the error message if available, otherwise a generic one
631
+ alert(
632
+ e instanceof Error && e.message
633
+ ? "Malformed URL: " + e.message
634
+ : "Please enter a valid URL."
635
+ );
636
return;
637
638
0 commit comments