56 lines
1.3 KiB
JavaScript
56 lines
1.3 KiB
JavaScript
// Posts
|
|
|
|
export class FailedFetchPostsError extends Error {
|
|
constructor(msg) {
|
|
super(`Failed to fetch posts: ${msg}`);
|
|
this.name = "FailedFetchPostsError";
|
|
}
|
|
}
|
|
|
|
export class FailedFetchPostError extends Error {
|
|
constructor(slug, msg) {
|
|
super(`Failed to fetch post '${slug}: ${msg}`);
|
|
this.name = "FailedFetchPostError";
|
|
}
|
|
}
|
|
|
|
// Book reviews
|
|
|
|
export class FailedFetchBookReviewsError extends Error {
|
|
constructor(msg) {
|
|
super(`Failed to fetch book reviews: ${msg}`);
|
|
this.name = "FailedFetchBookReviewsError";
|
|
}
|
|
}
|
|
|
|
export class FailedFetchBookReviewError extends Error {
|
|
constructor(slug, msg) {
|
|
super(`Failed to fetch book review '${slug}: ${msg}`);
|
|
this.name = "FailedFetchBookReviewError";
|
|
}
|
|
}
|
|
|
|
// Basic pages
|
|
|
|
export class FailedFetchBasicPagesError extends Error {
|
|
constructor(msg) {
|
|
super(`Failed to fetch basic pages: ${msg}`);
|
|
this.name = "FailedFetchBasicPagesError";
|
|
}
|
|
}
|
|
|
|
export class FailedFetchBasicPageError extends Error {
|
|
constructor(slug, msg) {
|
|
super(`Failed to fetch basic page '${slug}: ${msg}`);
|
|
this.name = "FailedFetchBasicPageError";
|
|
}
|
|
}
|
|
|
|
// CV
|
|
|
|
export class FailedFetchCVError extends Error {
|
|
constructor(msg) {
|
|
super(`Failed to fetch basic pages: ${msg}`);
|
|
this.name = "FailedFetchCVError";
|
|
}
|
|
}
|