Fixed thrown exception in case the type does not exists to return a 404
Not Found HTTP error to client
This commit is contained in:
parent
8413b94a86
commit
3bbcccca79
|
@ -383,6 +383,9 @@ public class SchemaManagementImpl implements SchemaManagement {
|
||||||
OMetadata oMetadata = oDatabaseDocument.getMetadata();
|
OMetadata oMetadata = oDatabaseDocument.getMetadata();
|
||||||
OSchema oSchema = oMetadata.getSchema();
|
OSchema oSchema = oMetadata.getSchema();
|
||||||
OClass baseOClass = oSchema.getClass(typeName);
|
OClass baseOClass = oSchema.getClass(typeName);
|
||||||
|
if(baseOClass == null) {
|
||||||
|
throw new SchemaNotFoundException(typeName + " does not Exists");
|
||||||
|
}
|
||||||
|
|
||||||
List<Type> typeDefinitions = new ArrayList<>();
|
List<Type> typeDefinitions = new ArrayList<>();
|
||||||
typeDefinitions.add(getType(baseOClass));
|
typeDefinitions.add(getType(baseOClass));
|
||||||
|
|
Loading…
Reference in New Issue