Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 1x 1x 44x | import NotFoundError from '../not-found-error';
import {MembershipId} from '@models';
/**
* This error is thrown if the server searches for a membership
* which doesn't exist.
*/
export class MembershipNotFoundError extends NotFoundError {
/**
* Creates an instance of this class with the specified attribute.
* @param id - The id of the membership which doesn't exist
*/
constructor(id: MembershipId) {
super(
`Membership of user ${id.userId} for group ${id.groupId} doesn't exist`,
id as unknown as Record<string, unknown>,
);
}
}
|