Utilizing rails on the backend and vue.js on the front end, I am attempting to display any errors that may occur. Despite having an error within the .catch
block, I am unable to extract the message from it. Any assistance in resolving this issue would be greatly appreciated.
.catch(function (error) {
debugger
});
When I attempt error.response.data.error
in the console, it returns
'{:message=>"Amount is less than the minimum value"}'
. I am struggling to isolate just the message itself.
https://i.sstatic.net/51LYr.png
https://i.sstatic.net/Cqqad.png
Error Solution