Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

Commit 8f33016

Browse files
committed
create new exception class for wrong batch delete type
1 parent a07aa4e commit 8f33016

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package org.brapi.test.BrAPITestServer.exceptions;
2+
3+
import io.swagger.model.core.BatchTypes;
4+
import org.springframework.http.HttpStatus;
5+
6+
public class BatchDeleteWrongTypeException extends BrAPIServerException {
7+
public BatchDeleteWrongTypeException(String msg, HttpStatus status) { super(status, ""); }
8+
9+
public BatchDeleteWrongTypeException(BatchTypes requiredType, BatchTypes suppliedType, String batchDeleteDbId, HttpStatus status) {
10+
super(status, "");
11+
String msg = "The " + suppliedType.toString() + " batch delete " + batchDeleteDbId + " must be of type " + requiredType.toString();
12+
}
13+
}

0 commit comments

Comments
 (0)