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
In debugging #962, I found that the error was not passed back to the callback, which prevents proper debugging in deployment. In addition to logging the error, the error should have been passed to the callback.
The text was updated successfully, but these errors were encountered:
Errors were only logged inside the SDK but were not passed to the callback, preventing proper error handling and debugging.
2)This made it difficult for developers to catch exceptions and react accordingly.
Fix Implemented:
Modified the SDK to ensure that errors are passed to the callback properly.
Before Fix: Errors were only logged and never returned to the callback. Calling an SDK function that triggers an error.
After Fix: Errors inside the SDK are now passed to the callback, not just logged.
Code to fix:
try {
someAsyncOperation(new Callback() { @OverRide
public void onSuccess(Result result) {
callback.onSuccess(result); // Pass successful result
}
@Override
public void onFailure(Exception e) {
log.error("Error occurred: " + e.getMessage(), e); // Log error
callback.onFailure(e); // Now forwarding error to callback
}
});
In debugging #962, I found that the error was not passed back to the callback, which prevents proper debugging in deployment. In addition to logging the error, the error should have been passed to the callback.
The text was updated successfully, but these errors were encountered: