insomnia
insomnia copied to clipboard
Fix: Using safeParser to parse Insomnia git yaml files
Background
Currently we're using InsomniaFileSchema.parse to parse git yaml files directly. Whenever it meets malformed yaml files or yaml file that is not supported for current version, it will throw error and the application will crash.
Changes
- Using
InsomniaFileSchema.safeParserto parse yaml files instead. - Throw error when
file.typeis not recognized rather than fall back to mock server workspace by default - Add unit test to cover unsupported yaml file