Alloy - LPS-51719 LPS-51857 Refine error handling, add respondWith as promised

https://issues.liferay.com/browse/LPS-51719 https://issues.liferay.com/browse/LPS-51857