GH-789 Propagate AWS FunctionInvoker exceptions

They will be handled by the AWS runtime and properly reported and recorded.
Resolves #789
This commit is contained in:
Oleg Zhurakousky
2022-01-12 10:44:29 +01:00
parent 2ccd8b502b
commit ff9cb57741
4 changed files with 18 additions and 27 deletions

View File

@@ -37,6 +37,10 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>

View File

@@ -21,7 +21,7 @@ public class FunctionConfiguration {
public Function<String, String> uppercase() {
return value -> {
if (value.equals("exception")) {
throw new RuntimeException("Intentional exception which should result in HTTP 417");
throw new RuntimeException("Intentional exception");
}
else {
return value.toUpperCase();