Skip to content
This repository was archived by the owner on Jan 27, 2024. It is now read-only.

Commit 635273c

Browse files
committed
Return actual request error instead of throwing it
1 parent cdd4c15 commit 635273c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

force-app/main/aura/LC_API/LC_APIHelper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ License: BSD 3-Clause License
117117
if ( response.success ) {
118118
return response.data;
119119
} else {
120-
throw new Error( response.data );
120+
return Promise.reject( response.data );
121121
}
122122
}));
123123

@@ -228,4 +228,4 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
228228
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
229229
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
230230
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
231-
*/
231+
*/

0 commit comments

Comments
 (0)