CommunitySolidServer/src/util/errors/MovedPermanentlyHttpError.ts
Joachim Van Herwegen 1b7cc1ea3a Merge branch 'main' into versions/4.0.0
# Conflicts:
#	test/unit/util/errors/RedirectHttpError.test.ts
2022-04-11 10:21:49 +02:00

16 lines
626 B
TypeScript

import type { HttpErrorOptions } from './HttpError';
import { generateRedirectHttpErrorClass } from './RedirectHttpError';
// eslint-disable-next-line @typescript-eslint/naming-convention
const BaseHttpError = generateRedirectHttpErrorClass(301, 'MovedPermanentlyHttpError');
/**
* Error used for resources that have been moved permanently.
* Methods other than GET may or may not be changed to GET in subsequent requests.
*/
export class MovedPermanentlyHttpError extends BaseHttpError {
public constructor(location: string, message?: string, options?: HttpErrorOptions) {
super(location, message, options);
}
}