Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fixes #7863

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean;
import org.odpi.openmetadata.accessservices.assetcatalog.model.Elements;
import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters;
import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogListResponse;
import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogResponse;
import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetCatalogSupportedTypes;
import org.odpi.openmetadata.accessservices.assetcatalog.model.rest.responses.AssetListResponse;
Expand Down Expand Up @@ -72,6 +71,8 @@ public AssetCatalogResponse getAssetDetailsByGUID(String serverName,
restExceptionHandler.captureUserNotAuthorizedException(response, e);
} catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) {
restExceptionHandler.capturePropertyServerException(response, e);
} catch (Exception e) {
restExceptionHandler.captureExceptions(response, e, methodName);
}

log.debug(METHOD_WITH_RESPONSE, methodName, response);
Expand Down Expand Up @@ -109,6 +110,8 @@ public AssetCatalogResponse getAssetUniverseByGUID(String serverName,
restExceptionHandler.captureUserNotAuthorizedException(response, e);
} catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) {
restExceptionHandler.capturePropertyServerException(response, e);
} catch (Exception e) {
restExceptionHandler.captureExceptions(response, e, methodName);
}

log.debug(METHOD_WITH_RESPONSE, methodName, response);
Expand Down Expand Up @@ -145,6 +148,8 @@ public ClassificationListResponse getClassificationByAssetGUID(String serverName
restExceptionHandler.captureUserNotAuthorizedException(response, e);
} catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) {
restExceptionHandler.capturePropertyServerException(response, e);
} catch (Exception e) {
restExceptionHandler.captureExceptions(response, e, methodName);
}

log.debug(METHOD_WITH_RESPONSE, methodName, response);
Expand Down Expand Up @@ -185,6 +190,8 @@ public RelationshipListResponse getAssetRelationships(String serverName,
restExceptionHandler.captureInvalidParameterException(response, e);
} catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) {
restExceptionHandler.capturePropertyServerException(response, e);
} catch (Exception e) {
restExceptionHandler.captureExceptions(response, e, methodName);
}

log.debug(METHOD_WITH_RESPONSE, methodName, response);
Expand Down Expand Up @@ -229,6 +236,8 @@ public AssetListResponse searchByType(String serverName,
restExceptionHandler.captureInvalidParameterException(response, e);
} catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) {
restExceptionHandler.capturePropertyServerException(response, e);
} catch (Exception e) {
restExceptionHandler.captureExceptions(response, e, methodName);
}

log.debug(METHOD_WITH_RESPONSE, methodName, response);
Expand Down Expand Up @@ -272,6 +281,8 @@ public AssetListResponse searchByTypeName(String serverName,
restExceptionHandler.captureInvalidParameterException(response, e);
} catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) {
restExceptionHandler.capturePropertyServerException(response, e);
} catch (Exception e) {
restExceptionHandler.captureExceptions(response, e, methodName);
}

log.debug(METHOD_WITH_RESPONSE, methodName, response);
Expand Down Expand Up @@ -315,6 +326,8 @@ public AssetListResponse searchByTypeGUID(String serverName,
restExceptionHandler.captureInvalidParameterException(response, e);
} catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) {
restExceptionHandler.capturePropertyServerException(response, e);
} catch (Exception e) {
restExceptionHandler.captureExceptions(response, e, methodName);
}

log.debug(METHOD_WITH_RESPONSE, methodName, response);
Expand Down Expand Up @@ -354,6 +367,8 @@ public AssetResponse buildContext(String serverName,
restExceptionHandler.captureInvalidParameterException(response, e);
} catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) {
restExceptionHandler.capturePropertyServerException(response, e);
} catch (Exception e) {
restExceptionHandler.captureExceptions(response, e, methodName);
}
log.debug(METHOD_WITH_RESPONSE, methodName, response);

Expand Down Expand Up @@ -386,6 +401,8 @@ public AssetCatalogSupportedTypes getSupportedTypes(String serverName,
restExceptionHandler.captureInvalidParameterException(response, e);
} catch (org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException e) {
restExceptionHandler.capturePropertyServerException(response, e);
} catch (Exception e) {
restExceptionHandler.captureExceptions(response, e, methodName);
}

log.debug(METHOD_WITH_RESPONSE, methodName, response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ public GUIDListResponse publishEntities(String serverName, String userId, String
restExceptionHandler.captureUserNotAuthorizedException(response, e);
} catch (PropertyServerException e) {
restExceptionHandler.capturePropertyServerException(response, e);
} catch (Exception e) {
restExceptionHandler.captureExceptions(response, e, methodName);
}
return response;
}
Expand Down Expand Up @@ -173,9 +175,9 @@ public GUIDListResponse publishEntity(String serverName, String userId, String e
GUIDListResponse response = new GUIDListResponse();

String methodName = "publishEntity";

AuditLog auditLog = null;
try {
AuditLog auditLog = instanceHandler.getAuditLog(userId, serverName, methodName);
auditLog = instanceHandler.getAuditLog(userId, serverName, methodName);
HandlerHelper handlerHelper = instanceHandler.getHandlerHelper(userId, serverName, methodName);
EntityDetail entity = handlerHelper.getEntityDetails(userId, guid, entityType);
if (entity == null) {
Expand All @@ -195,6 +197,8 @@ public GUIDListResponse publishEntity(String serverName, String userId, String e
restExceptionHandler.captureUserNotAuthorizedException(response, e);
} catch (PropertyServerException e) {
restExceptionHandler.capturePropertyServerException(response, e);
} catch (Exception e) {
restExceptionHandler.captureExceptions(response, e, methodName, auditLog);
}
return response;
}
Expand Down Expand Up @@ -294,6 +298,8 @@ public GUIDListResponse publishAssetContext(String serverName, String userId, St
restExceptionHandler.capturePropertyServerException(response, e);
} catch (OCFCheckedExceptionBase | JsonProcessingException e) {
restExceptionHandler.captureExceptions(response, e, methodName, auditLog);
} catch (Exception e) {
restExceptionHandler.captureExceptions(response, e, methodName, auditLog);
}
return response;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ logging.level.org.odpi.openmetadata=INFO
# Comma-separated list of origins.
# Example configuration below is for setting up local development environment where egeria-ui is hosted on one of the two urls.
# cors.allowed-origins=http://localhost,http://localhost:8081
cors.allowed-origins=
cors.allowed-origins=*

################################################
### Swagger Docs
Expand Down
Loading