insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

Fix: Using safeParser to parse Insomnia git yaml files

Open cwangsmv opened this issue 4 weeks ago • 0 comments

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.safeParser to parse yaml files instead.
  • Throw error when file.type is not recognized rather than fall back to mock server workspace by default
  • Add unit test to cover unsupported yaml file

INS-1763

cwangsmv avatar Nov 26 '25 03:11 cwangsmv