Skip to content

Commit 4ac2196

Browse files
committed
Add getExternalDocumentationLink
1 parent 0249aec commit 4ac2196

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

postgresql-plugin/src/main/java/io/cdap/plugin/postgres/PostgresErrorDetailsProvider.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,32 +42,32 @@ public class PostgresErrorDetailsProvider extends DBErrorDetailsProvider {
4242
ERROR_CODE_TO_ERROR_TYPE.put("28", ErrorType.USER);
4343
ERROR_CODE_TO_ERROR_TYPE.put("40", ErrorType.SYSTEM);
4444
ERROR_CODE_TO_ERROR_TYPE.put("42", ErrorType.USER);
45-
ERROR_CODE_TO_ERROR_TYPE.put("53", ErrorType.SYSTEM);
46-
ERROR_CODE_TO_ERROR_TYPE.put("54", ErrorType.SYSTEM);
45+
ERROR_CODE_TO_ERROR_TYPE.put("53", ErrorType.USER);
46+
ERROR_CODE_TO_ERROR_TYPE.put("54", ErrorType.USER);
4747
ERROR_CODE_TO_ERROR_TYPE.put("55", ErrorType.USER);
4848
ERROR_CODE_TO_ERROR_TYPE.put("57", ErrorType.SYSTEM);
4949
ERROR_CODE_TO_ERROR_TYPE.put("58", ErrorType.SYSTEM);
50-
ERROR_CODE_TO_ERROR_TYPE.put("P0", ErrorType.SYSTEM);
50+
ERROR_CODE_TO_ERROR_TYPE.put("P0", ErrorType.USER);
5151
ERROR_CODE_TO_ERROR_TYPE.put("XX", ErrorType.SYSTEM);
5252

5353
ErrorCategory.ErrorCategoryEnum plugin = ErrorCategory.ErrorCategoryEnum.PLUGIN;
5454
ERROR_CODE_TO_ERROR_CATEGORY = new HashMap<>();
5555
ERROR_CODE_TO_ERROR_CATEGORY.put("01", new ErrorCategory(plugin, "Warning"));
5656
ERROR_CODE_TO_ERROR_CATEGORY.put("02", new ErrorCategory(plugin, "No Data"));
57-
ERROR_CODE_TO_ERROR_CATEGORY.put("08", new ErrorCategory(plugin, "Connection Exception"));
58-
ERROR_CODE_TO_ERROR_CATEGORY.put("0A", new ErrorCategory(plugin, "Feature Not Supported"));
59-
ERROR_CODE_TO_ERROR_CATEGORY.put("22", new ErrorCategory(plugin, "Data Exception"));
60-
ERROR_CODE_TO_ERROR_CATEGORY.put("23", new ErrorCategory(plugin, "Integrity Constraint Violation"));
61-
ERROR_CODE_TO_ERROR_CATEGORY.put("28", new ErrorCategory(plugin, "Invalid Authorization Specification"));
57+
ERROR_CODE_TO_ERROR_CATEGORY.put("08", new ErrorCategory(plugin, "Postgres Server Connection Exception"));
58+
ERROR_CODE_TO_ERROR_CATEGORY.put("0A", new ErrorCategory(plugin, "Postgres Server Feature Not Supported"));
59+
ERROR_CODE_TO_ERROR_CATEGORY.put("22", new ErrorCategory(plugin, "Postgres Server Data Exception"));
60+
ERROR_CODE_TO_ERROR_CATEGORY.put("23", new ErrorCategory(plugin, "Postgres Integrity Constraint Violation"));
61+
ERROR_CODE_TO_ERROR_CATEGORY.put("28", new ErrorCategory(plugin, "Postgres Invalid Authorization Specification"));
6262
ERROR_CODE_TO_ERROR_CATEGORY.put("40", new ErrorCategory(plugin, "Transaction Rollback"));
6363
ERROR_CODE_TO_ERROR_CATEGORY.put("42", new ErrorCategory(plugin, "Syntax Error or Access Rule Violation"));
64-
ERROR_CODE_TO_ERROR_CATEGORY.put("53", new ErrorCategory(plugin, "Insufficient Resources"));
65-
ERROR_CODE_TO_ERROR_CATEGORY.put("54", new ErrorCategory(plugin, "Program Limit Exceeded"));
64+
ERROR_CODE_TO_ERROR_CATEGORY.put("53", new ErrorCategory(plugin, "Postgres Server Insufficient Resources"));
65+
ERROR_CODE_TO_ERROR_CATEGORY.put("54", new ErrorCategory(plugin, "Postgres Program Limit Exceeded"));
6666
ERROR_CODE_TO_ERROR_CATEGORY.put("55", new ErrorCategory(plugin, "Object Not in Prerequisite State"));
6767
ERROR_CODE_TO_ERROR_CATEGORY.put("57", new ErrorCategory(plugin, "Operator Intervention"));
68-
ERROR_CODE_TO_ERROR_CATEGORY.put("58", new ErrorCategory(plugin, "System Error"));
68+
ERROR_CODE_TO_ERROR_CATEGORY.put("58", new ErrorCategory(plugin, "Postgres Server System Error"));
6969
ERROR_CODE_TO_ERROR_CATEGORY.put("P0", new ErrorCategory(plugin, "PL/pgSQL Error"));
70-
ERROR_CODE_TO_ERROR_CATEGORY.put("XX", new ErrorCategory(plugin, "Internal Error"));
70+
ERROR_CODE_TO_ERROR_CATEGORY.put("XX", new ErrorCategory(plugin, "Postgres Server Internal Error"));
7171
}
7272

7373
@Override

postgresql-plugin/src/main/java/io/cdap/plugin/postgres/PostgresSource.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ protected Class<? extends DBWritable> getDBRecordType() {
7777
return PostgresDBRecord.class;
7878
}
7979

80+
@Override
81+
protected String getExternalDocumentationLink() {
82+
return DBUtils.POSTGRES_SUPPORTED_DOC_URL;
83+
}
84+
8085
@Override
8186
protected LineageRecorder getLineageRecorder(BatchSourceContext context) {
8287
String fqn = DBUtils.constructFQN("postgres",

0 commit comments

Comments
 (0)