@@ -317,31 +317,31 @@ module CompileFail = {
317
317
let decode = (json ): t => {
318
318
open JSON
319
319
switch json {
320
- | String (type_ ) =>
320
+ | Object ( dict { "type" : String (type_ )} ) =>
321
321
switch type_ {
322
322
| "syntax_error" =>
323
323
let locMsgs = switch json {
324
- | Object (dict {"erros " : Array (errors )}) => errors -> Array .map (LocMsg .decode )
325
- | _ => throw (Failure (` Failed to decode erros from syntax_error. ${__LOC__}` ))
324
+ | Object (dict {"errors " : Array (errors )}) => errors -> Array .map (LocMsg .decode )
325
+ | _ => throw (Failure (` Failed to decode errors from syntax_error. ${__LOC__}` ))
326
326
}
327
327
// TODO: There seems to be a bug in the ReScript bundle that reports
328
328
// back multiple LocMsgs of the same value
329
329
locMsgs -> LocMsg .dedupe -> SyntaxErr
330
330
| "type_error" =>
331
331
let locMsgs = switch json {
332
- | Object (dict {"erros " : Array (errors )}) => errors -> Array .map (LocMsg .decode )
333
- | _ => throw (Failure (` Failed to decode erros from type_error. ${__LOC__}` ))
332
+ | Object (dict {"errors " : Array (errors )}) => errors -> Array .map (LocMsg .decode )
333
+ | _ => throw (Failure (` Failed to decode errors from type_error. ${__LOC__}` ))
334
334
}
335
335
TypecheckErr (locMsgs )
336
336
| "warning_error" =>
337
337
let warnings = switch json {
338
- | Object (dict {"erros " : Array (warnings )}) => warnings -> Array .map (Warning .decode )
338
+ | Object (dict {"errors " : Array (warnings )}) => warnings -> Array .map (Warning .decode )
339
339
| _ => throw (Failure (` Failed to decode errors from warning_error. ${__LOC__}` ))
340
340
}
341
341
WarningErr (warnings )
342
342
| "other_error" =>
343
343
let locMsgs = switch json {
344
- | Object (dict {"erros " : Array (errors )}) => errors -> Array .map (LocMsg .decode )
344
+ | Object (dict {"errors " : Array (errors )}) => errors -> Array .map (LocMsg .decode )
345
345
| _ => throw (Failure (` Failed to decode errors from other_error. ${__LOC__}` ))
346
346
}
347
347
OtherErr (locMsgs )
0 commit comments