fix: prevent crash on invalid URI during JSON import (#561)
This PR fixes issue #561.
The JSON import flow was crashing because the default uri format validator inside jsonschema throws a TypeError when given an empty string or a non-URL-safe value.
This patch adds a safe custom URI validator (safeUriValidator) and overrides the built-in uri format.
It allows empty strings, trims input, and returns false instead of throwing — preventing the app from crashing.
Tested locally: ✓ Export JSON ✓ Re-import JSON in a fresh editor tab ✓ No errors, import works correctly
Thanks!
@khushthecoder is attempting to deploy a commit to the dottle's projects Team on Vercel.
A member of the Team first needs to authorize it.
@khushthecoder can u please provide a diagram where the error occurs
@khushthecoder can u please provide a diagram where the error occurs
sure will do it in a few moments
please export the diagram as json and attach it here