@bernierllc/content-type-blog-post
Version:
Blog post content type with rich TipTap editor, SEO metadata, database storage, and web publishing
45 lines (39 loc) • 1 kB
text/typescript
/*
Copyright (c) 2025 Bernier LLC
This file is licensed to the client under a limited-use license.
The client may use and modify this code *only within the scope of the project it was delivered for*.
Redistribution or use in other products or commercial offerings is not permitted without written consent from Bernier LLC.
*/
/**
* Base blog post error
*/
export class BlogPostError extends Error {
constructor(message: string, public code: string) {
super(message);
this.name = 'BlogPostError';
}
}
/**
* SEO validation error
*/
export class SEOValidationError extends BlogPostError {
constructor(message: string) {
super(message, 'SEO_VALIDATION_ERROR');
}
}
/**
* Database error
*/
export class DatabaseError extends BlogPostError {
constructor(message: string) {
super(message, 'DATABASE_ERROR');
}
}
/**
* Publishing error
*/
export class PublishingError extends BlogPostError {
constructor(message: string) {
super(message, 'PUBLISHING_ERROR');
}
}