Clinical6Error
Extends:
Clinical6Error is a class that extends Error so that it can easily translate information from internal SDK errors and platform errors
Test:
- [unit] Clinical6Error utility class should have a be an Error
- [unit] Clinical6Error utility class should handle the duplicate account name response
- [unit] Clinical6Error utility class should handle the duplicate account name response in html
- [unit] Clinical6Error utility class should handle the "something went wrong" response
- [unit] Clinical6Error utility class should handle the invalid user role response
- [unit] Clinical6Error utility class should handle the device is invalid (v3)
- [unit] Clinical6Error utility class should handle the device is already in use (v3)
- [unit] Clinical6Error utility class should handle application key cant be blank (v3)
- [unit] Clinical6Error utility class should handle permanent_link is invalid (v3)
- [unit] Clinical6Error utility class should handle email not found (v3)
- [unit] Clinical6Error utility class should handle param is missing or the value is empty: data (v3)
- [unit] Clinical6Error utility class should handle Record Not Found: MobileUser by id (v3)
- [unit] Clinical6Error utility class should handle Email is invalid (v3)
Constructor Summary
Public Constructor | ||
public |
constructor(message: String, module: String) Creates an instance of Clinical6Error. |
Member Summary
Public Members | ||
public get |
code: * Returns the internal_code from teh platform if it exists |
|
public get |
details: * Splits up the information about the error details into human readable text |
|
public get |
friendly: * Returns the friendly error if it exists |
|
public get |
friendlyHTML: * Formats the friendly error to HTML (replaces newline only) |
|
public |
|
|
public get |
messageHTML: * Formats the message to HTML (replaces newline only) |
|
public |
|
|
public get |
response: * Returns the response as an object if it's a string object (or object) or simply returns the value |
|
public |
source: Any |
|
public get |
status: * Returns the status if the response is an object |
Private Members | ||
private |
|
|
private |
|
Method Summary
Public Methods | ||
public |
extractMessage(message: *): String Extracts information from json to create the error message. |
|
public |
Determines if _response is an object |
Public Constructors
Public Members
public get details: * source
Splits up the information about the error details into human readable text
public get response: * source
Returns the response as an object if it's a string object (or object) or simply returns the value