RED-5748 - Redaction Service Error after helm upgrade
- in case of deleted types throw a NotFoundException providing the info about the type not found instead of NullPointerException
This commit is contained in:
parent
660abb318f
commit
776de8392a
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.iqser.red.service.redaction.v1.server.exception.NotFoundException;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
|
||||
@ -49,8 +50,9 @@ public class Dictionary {
|
||||
|
||||
|
||||
public DictionaryModel getType(String type) {
|
||||
|
||||
return localAccessMap.get(type);
|
||||
DictionaryModel model = localAccessMap.get(type);
|
||||
if (model == null) throw new NotFoundException("Type: " + type + " is not found");
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user