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

MINOR - Prepare App Instances & fix bigtable json #15292

Merged
merged 8 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
pmbrull marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package org.openmetadata.service.apps;

import javax.ws.rs.core.Response;
import org.openmetadata.sdk.exception.WebServiceException;

public class AppException extends WebServiceException {

private static final String BY_NAME_MESSAGE = "Application [%s] Exception [%s] due to [%s].";
private static final String ERROR_TYPE = "PIPELINE_SERVICE_ERROR";

public AppException(String message) {
super(Response.Status.BAD_REQUEST, ERROR_TYPE, message);
}

private AppException(Response.Status status, String message) {
super(status, ERROR_TYPE, message);
}

public static AppException byMessage(
String appName, String name, String errorMessage, Response.Status status) {
return new AppException(status, buildMessageByName(appName, name, errorMessage));
}

public static AppException byMessage(String appName, String name, String errorMessage) {
return new AppException(
Response.Status.BAD_REQUEST, buildMessageByName(appName, name, errorMessage));
}

private static String buildMessageByName(String appName, String name, String errorMessage) {
return String.format(BY_NAME_MESSAGE, appName, name, errorMessage);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{
"name": "ReadRows",
"description": "Validate that we can read rows with the given credentials.",
"errorMessage": "Failed to read rows from BigTable, please validate to the credentials of service account"
"errorMessage": "Failed to read rows from BigTable, please validate to the credentials of service account",
"shortCircuit": true,
"mandatory": true
}
Expand Down
Loading