@chelseaapps/recommender documentation

File

src/exceptions/rating-exists.exception.ts

Extends

HttpException

Constructor

import { HttpException, HttpStatus } from '@nestjs/common';

export class RatingExistsException extends HttpException {
	constructor() {
		super(
			'Rating of the exact same userId, itemId and timestamp is already present in the database. Note that a user may view item’s details multiple times, yet triplets (userId,itemId,timestamp) must be unique. In many cases, you may consider this code success – it only tells you that nothing has been written to the database.',
			HttpStatus.CONFLICT,
		);
	}
}

Was this helpful?