overhauled API:
- wrote openapi schema - re-implemented api endpoint following openapi schema - intensified and improved working with Result objects Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
/* © SRSoftware 2024 */
|
||||
package de.srsoftware.cal.db;
|
||||
|
||||
import de.srsoftware.tools.Error;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
public class NotFound<None> extends Error<None> {
|
||||
public NotFound(String message, Map<String, Object> data, Collection<Exception> exceptions) {
|
||||
super(message, data, exceptions);
|
||||
}
|
||||
|
||||
public static <T> NotFound<T> of(String message, Object... fills) {
|
||||
return new NotFound<>(message.formatted(fills), null, null);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public <NewType> NotFound<NewType> transform() {
|
||||
return new NotFound<>(message(), data(), exceptions());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user