Skip to content

Commit

Permalink
fix: error construction
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Feb 8, 2022
1 parent 40c4457 commit 6ecafb0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/vite/src/node/plugins/optimizedDeps.ts
Expand Up @@ -73,8 +73,8 @@ function throwProcessingError(id: string) {
)
err.code = ERR_OPTIMIZE_DEPS_PROCESSING_ERROR
// This error will be catched by the transform middleware that will
// send a 408 (request timeout) response to the browser
throw new Error(err)
// send a 504 status code request timeout
throw err
}

function throwOutdatedRequest(id: string) {
Expand All @@ -84,8 +84,8 @@ function throwOutdatedRequest(id: string) {
)
err.code = ERR_OUTDATED_OPTIMIZED_DEP
// This error will be catched by the transform middleware that will
// send a 408 (request timeout) response to the browser
throw new Error(err)
// send a 504 status code request timeout
throw err
}

function optimizeDepInfoFromFile(
Expand Down

0 comments on commit 6ecafb0

Please sign in to comment.