next.js
c0104dcf - Turbopack: improve error handling when DB read/deserialization fails (#79545)

Commit
329 days ago
Turbopack: improve error handling when DB read/deserialization fails (#79545) ### What? Instead of only printing on DB read errors, panic instead of continuing with a corrupted graph. Also improve the error message to be more clear about deserialization errors: Before: ``` Looking up data for TaskId 3 failed: missing field `type` [Error: Cell CellId { type_id: ValueTypeId { id: 548, name: "next-core@TODO::::next_config::NextConfig" }, index: 0 } no longer exists in task NextConfig::from_string (no cell of this type exists) Debug info: - Execution of TaskId { id: 2147483648 } transient failed - Execution of ProjectContainer::project failed - Cell CellId { type_id: ValueTypeId { id: 548, name: "next-core@TODO::::next_config::NextConfig" }, index: 0 } no longer exists in task NextConfig::from_string (no cell of this type exists)] { code: 'GenericFailure' } ``` After: ``` thread 'tokio-runtime-worker' panicked at /Users/sokra/Repos/next.js/turbopack/crates/turbo-tasks-backend/src/backend/operation/mod.rs:177:17: Failed to restore task data: Data for NextConfig::from_string (TaskId 3)) Caused by: 0: Looking up data for TaskId 3 from database failed 1: Deserialization failed 2: [71].CellData.value[1].turbopack.conditions.#next-mdx.path: missing field `type` ```
Author
Parents
Loading