sdk-java icon indicating copy to clipboard operation
sdk-java copied to clipboard

Null cause in Nexus HandlerException is not handled correctly

Open dandavison opened this issue 6 months ago • 0 comments

In a Nexus operation, HandlerException has a constructor

  public HandlerException(ErrorType errorType, @Nullable Throwable cause)

inviting operation authors to throw a HandlerException with no cause, such as

throw new HandlerException(HandlerException.ErrorType.NOT_FOUND, (Throwable) null);

But this crashes at https://github.com/temporalio/sdk-java/blob/f919926a2d67c10c34fee4b19eed1c605d4223a4/temporal-sdk/src/main/java/io/temporal/common/converter/PayloadAndFailureDataConverter.java#L136-L145

dandavison avatar Jul 05 '25 22:07 dandavison