import { type IActivity, type ITraceable, JsonResponse, type PenguenoRequest, type ServerTrace, } from "@emprespresso/pengueno"; const messages = [ "D: Meow-t found! Your API call ran away!", "404-bidden! But like...in a cute way >:3 !", ":o Your data went on a paw-sible vacation!", "uwu~ not found, but found our hearts instead!", ]; const randomFourOhFour = () => messages[Math.random() * messages.length]; export interface IFourOhFourActivity { fourOhFour: IActivity; } export class FourOhFourActivityImpl implements IFourOhFourActivity { public fourOhFour(req: ITraceable) { return req .move(new JsonResponse(req, randomFourOhFour(), { status: 404 })) .map((resp) => Promise.resolve(resp.get())) .get(); } }