← Back to community index
# contributor·Active

0hmx - @ohmx random-test-1/emdash/olive-lights...

code sample what dose this error mean?

Started by 0hmxJul 29, 202611 messages

Discussion

Last active last month · plain text
0hmxoriginal post
``` @ohmx random-test-1/emdash/olive-lights-wear-q1p6m on  emdash/olive-lights-wear-q1p6m [?] is 📦 v1.0.0 via 🥟 v1.3.10 took 1s ❯ tsci import RK3566 ✖ Failed to import part [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "dataStr", "head", "editorVersion" ], "message": "Required" }, { "code": "invalid_type", "expected": "boolean", "received": "undefined", "path": [ "dataStr", "head", "hasIdFlag" ], "message": "Required" }, { "code": "invalid_type", "expected": "object", "received": "undefined", "path": [ "dataStr", "BBox" ], "message": "Required" }, { "code": "invalid_union", "unionErrors": [ { "issues": [ { "code": "invalid_type", "expected": "array", "received": "undefined", "path": [ "dataStr", "colors" ], "message": "Required" } ], "name": "ZodError" }, { "issues": [ { "code": "invalid_type", "expected": "object", "received": "undefined", "path": [ "dataStr", "colors" ], "message": "Required" } ], "name": "ZodError" } ], "path": [ "dataStr", "colors" ], "message": "Invalid input" } ] @ohmx random-test-1/emdash/olive-lights-wear-q1p6m on  emdash/olive-lights-wear-q1p6m [?] is 📦 v1.0.0 via 🥟 v1.3.10 took 3s ❯ ``` what dose this error mean?
Seve
use tsci import C2843676 maybe?
Seve
or whatever the jlc part number is
Seve
idk that's a weird error
Seve
someone should fix
Seve
CC <@1067854999889137715> possible bug in jlcpcb import
0hmx
``` @ohmx random-test-1/emdash/olive-lights-wear-q1p6m on  emdash/olive-lights-wear-q1p6m [?] is 📦 v1.0.0 via 🥟 v1.3.10 took 2s ❯ tsci import C2943786 ✖ Failed to import part [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "dataStr", "head", "editorVersion" ], "message": "Required" }, { "code": "invalid_type", "expected": "boolean", "received": "undefined", "path": [ "dataStr", "head", "hasIdFlag" ], "message": "Required" }, { "code": "invalid_type", "expected": "object", "received": "undefined", "path": [ "dataStr", "BBox" ], "message": "Required" }, { "code": "invalid_union", "unionErrors": [ { "issues": [ { "code": "invalid_type", "expected": "array", "received": "undefined", "path": [ "dataStr", "colors" ], "message": "Required" } ], "name": "ZodError" }, { "issues": [ { "code": "invalid_type", "expected": "object", "received": "undefined", "path": [ "dataStr", "colors" ], "message": "Required" } ], "name": "ZodError" } ], "path": [ "dataStr", "colors" ], "message": "Invalid input" } ] ``` same error with `tsci import C2943786`
0hmx
<@809856037376491570>
techmannih
Search works correctly and resolves RK3566 to C2943786. The import fails afterward because EasyEDA returns footprint-only data with an empty schematic, omitting editorVersion, hasIdFlag, BBox, and colors. Our Zod schema is too strict and incorrectly required these fields, causing validation to fail before conversion.
0hmx
Makes sense. Just make sure errors like this are not shown to the user. Instead, display a shorter message such as: “An internal error occurred” or “Invalid footprint or import data error”
techmannih
Yes, these missing fields now have safe defaults, so this Zod error will no longer reach the user. For import errors should be add a short message for users separately.

Want to add to the conversation?

Reply in Discord so your notes stay connected to the source.
Continue in Discord ↗