(id: string)
| 115 | } |
| 116 | |
| 117 | function throwProcessingError(id: string): never { |
| 118 | const err: any = new Error( |
| 119 | `Something unexpected happened while optimizing "${id}". ` + |
| 120 | `The current page should have reloaded by now`, |
| 121 | ) |
| 122 | err.code = ERR_OPTIMIZE_DEPS_PROCESSING_ERROR |
| 123 | // This error will be caught by the transform middleware that will |
| 124 | // send a 504 status code request timeout |
| 125 | throw err |
| 126 | } |
| 127 | |
| 128 | export function throwOutdatedRequest(id: string): never { |
| 129 | const err: any = new Error( |