Pull request #505: RED-5748 - Redaction Service Error after helm upgrade
Merge in RED/redaction-service from RED-5748 to master * commit '776de8392a78f7b26e864e37f4be607d1ff7e48e': 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:
commit
05bf95d62b
@ -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