refacto: error and types
This commit is contained in:
@@ -15,6 +15,7 @@ export async function GET(request: NextRequest, { params }: { params: { bookId:
|
||||
{
|
||||
error: {
|
||||
code: error.code,
|
||||
name: "Image fetch error",
|
||||
message: getErrorMessage(error.code),
|
||||
},
|
||||
},
|
||||
@@ -25,6 +26,7 @@ export async function GET(request: NextRequest, { params }: { params: { bookId:
|
||||
{
|
||||
error: {
|
||||
code: ERROR_CODES.IMAGE.FETCH_ERROR,
|
||||
name: "Image fetch error",
|
||||
message: getErrorMessage(ERROR_CODES.IMAGE.FETCH_ERROR),
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user