feat: log the error message when an async operation fails #986
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When doing a provision/update/delete/../etc operation, if it fails for any reason, we update last operation status and message. However we only return an error from the last_operation endpoing under the certain circumpstances (see OSBAPI spec. All other circumpstances the return code is OK and we only log the operation status (failed), but not the message (brokerapi does this for us).
With that into consideration, we need to log any error messages that ocurr in our application to improve troubleshooting. This change logs the error message that will be saved into the last operation message whenever last operation is updated with a failed state.
#187292596
Checklist: