From 2faa366df351ee6480635650ef128bb8d42cdb84 Mon Sep 17 00:00:00 2001 From: Eka Winata Date: Fri, 19 Jul 2024 16:49:23 +0700 Subject: [PATCH] Update default value --- docs/docs/sinks/grpc-sink.md | 11 ++++++++++- .../gotocompany/firehose/config/GrpcSinkConfig.java | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/docs/sinks/grpc-sink.md b/docs/docs/sinks/grpc-sink.md index c0fcae995..69aca4a15 100644 --- a/docs/docs/sinks/grpc-sink.md +++ b/docs/docs/sinks/grpc-sink.md @@ -95,4 +95,13 @@ For more information about CEL please refer to this documentation : https://gith Example retry rule : - Retry on specific error code : `com.gotocompany.generic.GenericResponse.errors.exists(e, e.code == "400")` - Retry on specific error code range : `com.gotocompany.generic.GenericResponse.errors.exists(e, int(e.code) >= 400 && int(e.code) <= 500)` - - Retry on error codes outside from specific error codes : `com.gotocompany.generic.GenericResponse.errors.exists(e, !(int(e.code) in [400, 500, 600]))` \ No newline at end of file + - Retry on error codes outside from specific error codes : `com.gotocompany.generic.GenericResponse.errors.exists(e, !(int(e.code) in [400, 500, 600]))` + +### `SINK_GRPC_RESPONSE_RETRY_ERROR_TYPE` + +Defines the ErrorType to assign for a retryable error. This is used in conjunction with `SINK_GRPC_RESPONSE_RETRY_CEL_EXPRESSION` and `ERROR_TYPES_FOR_RETRY`. +Value must be defined in com.gotocompany.depot.error.ErrorType + +- Example value: `SINK_RETRYABLE_ERROR` +- Type: `optional` +- Default Value: `DEFAULT_ERROR` diff --git a/src/main/java/com/gotocompany/firehose/config/GrpcSinkConfig.java b/src/main/java/com/gotocompany/firehose/config/GrpcSinkConfig.java index 3a9373ca1..6f972f8f0 100644 --- a/src/main/java/com/gotocompany/firehose/config/GrpcSinkConfig.java +++ b/src/main/java/com/gotocompany/firehose/config/GrpcSinkConfig.java @@ -37,7 +37,7 @@ public interface GrpcSinkConfig extends AppConfig { String getSinkGrpcResponseRetryCELExpression(); @Config.Key("SINK_GRPC_RESPONSE_RETRY_ERROR_TYPE") - @DefaultValue("ErrorType.DEFAULT_ERROR") + @DefaultValue("DEFAULT_ERROR") @ConverterClass(GrpcSinkRetryErrorTypeConverter.class) ErrorType getSinkGrpcRetryErrorType();