Initial commit

This commit is contained in:
fraqtal
2026-07-12 08:15:46 +00:00
commit ee0fec0691
1397 changed files with 127242 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
export class InputParseError extends Error {
constructor(message: string, options?: ErrorOptions) {
super(message, options);
this.name = "InputParseError";
}
}

View File

@@ -0,0 +1,20 @@
import { describe, it, expect } from "vitest";
import { MediaNotFoundError } from "@/entities/errors/media";
describe("MediaNotFoundError", () => {
it("is an instance of Error", () => {
const err = new MediaNotFoundError();
expect(err).toBeInstanceOf(Error);
expect(err).toBeInstanceOf(MediaNotFoundError);
});
it("has default message", () => {
const err = new MediaNotFoundError();
expect(err.message).toBe("Media not found");
});
it("accepts a custom message", () => {
const err = new MediaNotFoundError("Custom message");
expect(err.message).toBe("Custom message");
});
});

View File

@@ -0,0 +1,6 @@
export class MediaNotFoundError extends Error {
constructor(message = "Media not found", options?: ErrorOptions) {
super(message, options);
this.name = "MediaNotFoundError";
}
}