@cellaware/utils 8.7.7 → 8.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* **Note:** will throw message 'An error occurred. Please try again in a moment.' if none provided.
|
|
5
5
|
*/
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function assertResponseOk(res: Response, message?: string): Response;
|
|
7
7
|
export interface ChatWMSResponse {
|
|
8
8
|
ok: boolean;
|
|
9
9
|
error: string;
|
package/dist/chatwms/response.js
CHANGED
|
@@ -4,7 +4,7 @@ const RESPONSE_ERROR_MESSAGE = 'An error occurred. Please try again in a moment.
|
|
|
4
4
|
*
|
|
5
5
|
* **Note:** will throw message 'An error occurred. Please try again in a moment.' if none provided.
|
|
6
6
|
*/
|
|
7
|
-
export function
|
|
7
|
+
export function assertResponseOk(res, message) {
|
|
8
8
|
if (!res.ok) {
|
|
9
9
|
throw new Error(message ?? RESPONSE_ERROR_MESSAGE);
|
|
10
10
|
}
|