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

[CDAP-21093] Add errorCodeType, errorCode & supportedDocURL in exception (MySQL) #530

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

psainics
Copy link
Contributor

@psainics psainics commented Dec 17, 2024

Add errorCodeType, errorCode & supportedDocURL in exception

Jira : CDAP-21093

Description

Adding errorCodeType, errorCode & supportedDocURL in exception for mysql, and command DBErrorDetailsProvider class

Code change

  • Modified DBErrorDetailsProvider.java
  • Modified DBRecord.java
  • Modified DBUtils.java
  • Modified MysqlErrorDetailsProvider.java

Test

image
image

image

@psainics psainics added the build label Dec 17, 2024
@psainics psainics self-assigned this Dec 17, 2024
@psainics psainics changed the title [CDAP-21093] Add errorCodeType, errorCode & supportedDocURL in exception [CDAP-21093] Add errorCodeType, errorCode & supportedDocURL in exception (MySQL) Dec 17, 2024
@psainics psainics requested a review from AnkitCLI December 17, 2024 04:14
@psainics psainics marked this pull request as ready for review December 17, 2024 04:49
@@ -76,7 +78,8 @@ private ProgramFailureException getProgramFailureException(SQLException e, Error
externalDocumentationLink);
}
return ErrorUtils.getProgramFailureException(new ErrorCategory(ErrorCategory.ErrorCategoryEnum.PLUGIN),
errorMessage, errorMessageWithDetails, getErrorTypeFromErrorCode(errorCode), false, e);
errorMessage, errorMessageWithDetails, getErrorTypeFromErrorCode(errorCode), false, ErrorCodeType.SQLSTATE,
sqlState, DBUtils.MYSQL_SUPPORTED_DOC_URL, e);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The supported doc url should come from child class, we cannot hardcoded mysql.

Copy link
Contributor Author

@psainics psainics Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦 typo, Fixed !


Tested Again

image

@psainics psainics force-pushed the patch/errorCodeTypeExtention branch from 1d0fb5c to 98792ac Compare December 17, 2024 05:03
@psainics psainics force-pushed the patch/errorCodeTypeExtention branch from 98792ac to 5c958cb Compare December 17, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants