Skip to content

Commit

Permalink
Add missing exception
Browse files Browse the repository at this point in the history
  • Loading branch information
danigiri committed Oct 29, 2024
1 parent d19411b commit d90ec95
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package pl.allegro.tech.hermes.domain.topic;

import java.time.Instant;

import pl.allegro.tech.hermes.api.ErrorCode;
import pl.allegro.tech.hermes.api.TopicName;
import pl.allegro.tech.hermes.common.exception.HermesException;


public class TopicDeletedRecentlyException extends HermesException {

public TopicDeletedRecentlyException(TopicName topicName, Instant thresholdTime) {
super(String.format("Topic %s cannot created until %s", topicName.qualifiedName(), thresholdTime.toString()));
}


@Override
public ErrorCode getCode() { // TODO Auto-generated method stub
return ErrorCode.TOPIC_CREATED_RECENTLY;
}

}

0 comments on commit d90ec95

Please sign in to comment.