# Code coverage report for atlas-mobile-ts/src/utils/RequestUtils.ts

# All files / atlas-mobile-ts/src/utils RequestUtils.ts

0% Statements 0/7
0% Branches 0/1
0% Functions 0/1
0% Lines 0/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29

     ﻿/* Copyright (C) Click & Push Accessibility, Inc - All Rights Reserved
     * Unauthorized copying of this file, via any medium is strictly prohibited
     * Proprietary and confidential
     * Written and maintained by the Click & Push Development team
     * <dev@clicknpush.ca>, January 2022
     */

    import { AxiosError } from "axios";
    import Config from 'react-native-config'

    /**
     * Array that maps {@linkcode landmark_type} from {@link Landmark} to a string representing that landmark type.
     */
     export const reportAxiosError = (desc: string,  error: AxiosError, printResponse?: boolean) => {
        let errorString = `XHR error: ${desc}\nError code: ${error.response?.status}\nError message: ${error.message}`;

        Iif (printResponse) {
            errorString + "\nError response: " + error.response;
        }

        console.error(errorString);
    }

    /**
     * Change the api url here
     */
    //export const API_URL = 'http://192.168.3.81:8000'
    export const API_URL = 'https://staging.clicknpush.ca'