feat(captcha): add ALTCHA proof-of-work captcha experiment (#2986)

This commit is contained in:
Hampus authored and GitHub committed 2026-09-27 21:02:55 +02:00
1 parent 33a118d12a
commit 7e1b934637
69 files changed
+1848 -216

No files matched your search

+5 -4
View File
@@ -2,17 +2,18 @@
import {APIErrorCodes} from '@fluxer/constants/src/ApiErrorCodes';
import {BadRequestError} from '@fluxer/errors/src/domains/core/BadRequestError';
import type {FluxerErrorData} from '@fluxer/errors/src/FluxerError';
export class CaptchaRequiredError extends BadRequestError {
constructor() {
super({code: APIErrorCodes.CAPTCHA_REQUIRED});
constructor(data?: FluxerErrorData) {
super({code: APIErrorCodes.CAPTCHA_REQUIRED, data});
this.name = 'CaptchaRequiredError';
}
}
export class InvalidCaptchaError extends BadRequestError {
constructor() {
super({code: APIErrorCodes.INVALID_CAPTCHA});
constructor(data?: FluxerErrorData) {
super({code: APIErrorCodes.INVALID_CAPTCHA, data});
this.name = 'InvalidCaptchaError';
}
}