refacto: error and types
This commit is contained in:
@@ -20,6 +20,7 @@ export async function GET(
|
||||
{
|
||||
error: {
|
||||
code: error.code,
|
||||
name: "Image fetch error",
|
||||
message: getErrorMessage(error.code),
|
||||
},
|
||||
},
|
||||
@@ -30,6 +31,7 @@ export async function GET(
|
||||
{
|
||||
error: {
|
||||
code: ERROR_CODES.IMAGE.FETCH_ERROR,
|
||||
name: "Image fetch error",
|
||||
message: getErrorMessage(ERROR_CODES.IMAGE.FETCH_ERROR),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -18,6 +18,7 @@ export async function GET(
|
||||
{
|
||||
error: {
|
||||
code: ERROR_CODES.BOOK.PAGES_FETCH_ERROR,
|
||||
name: "Image fetch error",
|
||||
message: getErrorMessage(ERROR_CODES.BOOK.PAGES_FETCH_ERROR),
|
||||
},
|
||||
},
|
||||
@@ -34,6 +35,7 @@ export async function GET(
|
||||
{
|
||||
error: {
|
||||
code: error.code,
|
||||
name: "Image fetch error",
|
||||
message: getErrorMessage(error.code),
|
||||
},
|
||||
},
|
||||
@@ -44,6 +46,7 @@ export async function GET(
|
||||
{
|
||||
error: {
|
||||
code: ERROR_CODES.IMAGE.FETCH_ERROR,
|
||||
name: "Image fetch error",
|
||||
message: getErrorMessage(ERROR_CODES.IMAGE.FETCH_ERROR),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -17,6 +17,7 @@ export async function GET(request: NextRequest, { params }: { params: { seriesId
|
||||
{
|
||||
error: {
|
||||
code: error.code,
|
||||
name: "Image fetch error",
|
||||
message: getErrorMessage(error.code),
|
||||
},
|
||||
},
|
||||
@@ -27,6 +28,7 @@ export async function GET(request: NextRequest, { params }: { params: { seriesId
|
||||
{
|
||||
error: {
|
||||
code: ERROR_CODES.IMAGE.FETCH_ERROR,
|
||||
name: "Image fetch error",
|
||||
message: getErrorMessage(ERROR_CODES.IMAGE.FETCH_ERROR),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -15,6 +15,7 @@ export async function GET(request: NextRequest, { params }: { params: { seriesId
|
||||
{
|
||||
error: {
|
||||
code: error.code,
|
||||
name: "Image fetch error",
|
||||
message: getErrorMessage(error.code),
|
||||
},
|
||||
},
|
||||
@@ -25,6 +26,7 @@ export async function GET(request: NextRequest, { params }: { params: { seriesId
|
||||
{
|
||||
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