You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not throw when the server responds with something we do not have in the schema yet
Mentioning @mifi@remcohaszing@Acconut@tim-kos because this may be controversial, but i think when retrofitting types and schemas on a big api like ours, this is the least evil and still a good step forward.
`The API responded with data that does not match the expected schema.\n${parsedResult.humanReadable}`
403
405
)
406
+
// eslint-disable-next-line no-console
407
+
console.error(
408
+
`---\nPlease report this error to Transloadit ([email protected]). We are working on better schemas for our API and this looks like something we do not cover yet: \n\n${err}\nThank you in advance!---\n`
409
+
)
410
+
// @TODO, once our schemas have matured, we should throw the error here.
411
+
// But as it stands, schemas are new, and we can't easily update all customer's node-sdks,
412
+
// so there will be a long tail of throws if we enable this now.
`API response for listAssemblies contained items that do not match the expected schema.\n${parsedResult.humanReadable}`
479
492
)
493
+
// eslint-disable-next-line no-console
494
+
console.error(
495
+
`---\nPlease report this error to Transloadit ([email protected]). We are working on better schemas for our API and this looks like something we do not cover yet: \n\n${err}\nThank you in advance!---\n`
496
+
)
497
+
return{
498
+
// @TODO, once our schemas have matured, we should throw the error here.
499
+
// But as it stands, schemas are new, and we can't easily update all customer's node-sdks,
500
+
// so there will be a long tail of throws if we enable this now.
`The API responded with data that does not match the expected schema.\n${parsedResult.humanReadable}`
508
532
)
533
+
// eslint-disable-next-line no-console
534
+
console.error(
535
+
`---\nPlease report this error to Transloadit ([email protected]). We are working on better schemas for our API and this looks like something we do not cover yet: \n\n${err}\nThank you in advance!---\n`
536
+
)
537
+
// @TODO, once our schemas have matured, we should throw the error here.
538
+
// But as it stands, schemas are new, and we can't easily update all customer's node-sdks,
539
+
// so there will be a long tail of throws if we enable this now.
0 commit comments