Skip to content

[Feature]: Throw a user friendly error if the SDK is run in non-durable functions #385

@zhongkechen

Description

@zhongkechen

What would you like?

I would like to see a user friendly error message if this SDK is run in non-durable functions

Currently the exception and error message is very confusing in this case:

START RequestId: 38062828-caf8-4afb-87fa-f01d87cfbd76 Version: $LATEST
Cannot invoke "String.split(String, int)" because "this.durableExecutionArn" is null: java.lang.NullPointerException
java.lang.NullPointerException: Cannot invoke "String.split(String, int)" because "this.durableExecutionArn" is null
at software.amazon.lambda.durable.execution.ExecutionManager.<init>(ExecutionManager.java:86)
at software.amazon.lambda.durable.execution.DurableExecutor.execute(DurableExecutor.java:50)
at software.amazon.lambda.durable.DurableHandler.handleRequest(DurableHandler.java:133)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)

Possible Implementation

No response

Is this a breaking change?

No

Does this require an RFC?

No

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions