Default value of `timeout` in RequestOptions should be Optional.empty(), not null
Closed this issue · 1 comments
williamliu52 commented
I'm testing the SDK in my Kotlin project, like so
val result = mergeApiClient.hris().employees().list(
EmployeesListRequest.builder().build(),
RequestOptions.builder()
.accountToken("token-here")
.build()
)
When I run this, I encounter the following error
java.lang.NullPointerException: Cannot invoke "java.util.Optional.isPresent()" because the return value of "com.merge.api.core.RequestOptions.getTimeout()" is null
at com.merge.api.resources.hris.employees.EmployeesClient.list(EmployeesClient.java:183)
I believe that this can be fixed if the default value for timeout
in RequestOptions
is changed from null
to Optional.empty()
dsinghvi commented
@williamliu52 this should be fixed on the latest java sdk. Linking the relevant source as well.
Apologies for the delay!