The line: handleCustomError(e.reason.message, e.reason.stack); fails because the "e" has no "reason" or "detail".
The line:
fails because the "e" has no "reason" or "detail".