diff --git a/README.md b/README.md index 1ce7673..7e6c3eb 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@
-![version 0.4.4](https://img.shields.io/badge/version-0.4.4--beta--1-black?labelColor=black&style=flat-square) ![jdk 17](https://img.shields.io/badge/minimum_jdk-17-orange?labelColor=black&style=flat-square) ![load-test](https://img.shields.io/badge/load%20test%2010%2C000%2C000-success-brightgreen?labelColor=black&style=flat-square) +![version 0.4.5](https://img.shields.io/badge/version-0.4.5-black?labelColor=black&style=flat-square) ![jdk 17](https://img.shields.io/badge/minimum_jdk-17-orange?labelColor=black&style=flat-square) ![load-test](https://img.shields.io/badge/load%20test%2010%2C000%2C000-success-brightgreen?labelColor=black&style=flat-square) ![redis--stream](https://img.shields.io/badge/-redis--stream-da2020?style=flat-square&logo=Redis&logoColor=white) **TPS(6,000)** on my Macbook air m2(default options). _[link](#Test1-TPS)_ diff --git a/gradle.properties b/gradle.properties index b92caea..9da9887 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ kotlin.code.style=official ### Project ### group=org.rooftopmsa -version=0.4.4-beta-1 +version=0.4.5 compatibility=17 ### Sonarcloud ### diff --git a/src/main/kotlin/org/rooftop/netx/api/Result.kt b/src/main/kotlin/org/rooftop/netx/api/Result.kt index fac3278..490bec4 100644 --- a/src/main/kotlin/org/rooftop/netx/api/Result.kt +++ b/src/main/kotlin/org/rooftop/netx/api/Result.kt @@ -22,7 +22,12 @@ class Result private constructor( * @param typeReference * @return T result of saga */ - fun decodeResultOrThrow(typeReference: TypeReference): T = decodeResult(typeReference) + fun decodeResultOrThrow(typeReference: TypeReference): T { + if (!isSuccess) { + throwError() + } + return decodeResult(typeReference) + } /** * @see decodeResultOrThrow