Skip to content

CE-3235: Handle invalid json edge case

Max Frederiksen requested to merge CE-3235-support-invalid-json into develop

Had to do some weird manual work-arounds for making the invalid json edge case work properly. Filter it out from previewGeneration endpoint, and manually do a JSON.parse with try/catch on response from fetchFileContent... Unfortunate I know...

Other stuff:

  • Moved "type" into context to get away from prop drilling. type! is a typescript non-null assertion which saves us from doing extra checks. Since the whole Generate page is wrapped in a Dataloader it will always have type.
  • Made a seperate component for the config file preview pane since now we want to use fetchFileContent
  • Modified Error handling logic and visual in Filepreview
  • Moved TemplateFilePreview out of own folder into parent folder
  • CE-3255 Added small fix for this
  • CE-3209 Fix for this, needed in order to complete this MR
Edited by Max Frederiksen

Merge request reports

Loading