You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure what is the expected behavior in general by JS/TS devs but in the Java SDK we treat a .failure(...) response as a validation error or expected failure that you only want returned to the user, while an thrown exception/error is something unexpected that we log as an error and return something like an "Internal Server Error" response to the user (not leaking service internal details).
Not sure what is the expected behavior in general by JS/TS devs but in the Java SDK we treat a
.failure(...)
response as a validation error or expected failure that you only want returned to the user, while an thrown exception/error is something unexpected that we log as an error and return something like an "Internal Server Error" response to the user (not leaking service internal details).The JS SDK currently handles both these cases the same, logging at debug and returning a failure response of the error turned into string: https://github.com/lightbend/akkaserverless-javascript-sdk/blob/main/sdk/src/action-support.js#L369
We should probably revisit this. And also align the error handling of the different components.
The text was updated successfully, but these errors were encountered: