Skip to content

Commit

Permalink
Task 22 : Define UserNotFoundException
Browse files Browse the repository at this point in the history
  • Loading branch information
Rapter1990 committed Jul 1, 2024
1 parent b1a06c9 commit 361ad05
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.springboot.ratelimiter.common.exception.user;

import com.springboot.ratelimiter.common.exception.NotFoundException;

import java.io.Serial;

public class UserNotFoundException extends NotFoundException {

@Serial
private static final long serialVersionUID = -5868536504664147877L;

private static final String DEFAULT_MESSAGE =
"The specified user is not found";

private static final String MESSAGE_TEMPLATE =
"No user was found with ID: ";

public UserNotFoundException(String id) {
super(MESSAGE_TEMPLATE.concat(id));
}

public UserNotFoundException() {
super(DEFAULT_MESSAGE);
}

}

0 comments on commit 361ad05

Please sign in to comment.