nextemos 4.8.1 → 4.8.2
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.
|
@@ -45,7 +45,7 @@ const fetchRequest = () => {
|
|
|
45
45
|
}
|
|
46
46
|
const requestOptions = Object.assign(Object.assign({ cache: process.env.CACHE_STRATEGY || "no-store" }, options), { method });
|
|
47
47
|
if (process.env.NODE_ENV === "development")
|
|
48
|
-
console.log(`Fetch Request: ${method}
|
|
48
|
+
console.log(`Fetch Request: ${method}`, apiURL.toString(), apiURL, requestOptions);
|
|
49
49
|
try {
|
|
50
50
|
const response = yield fetch(apiURL.toString(), requestOptions);
|
|
51
51
|
if (!response.ok) {
|
|
@@ -53,6 +53,7 @@ const fetchRequest = () => {
|
|
|
53
53
|
if (process.env.NODE_ENV === "development")
|
|
54
54
|
console.log("Fetch Error: ", {
|
|
55
55
|
api: apiURL,
|
|
56
|
+
apiUrl: apiURL.toString(),
|
|
56
57
|
status: response.status,
|
|
57
58
|
errorMessage: errorDetail,
|
|
58
59
|
});
|
|
@@ -78,6 +79,7 @@ const fetchRequest = () => {
|
|
|
78
79
|
if (process.env.NODE_ENV === "development") {
|
|
79
80
|
console.log("Fetch Success: ", {
|
|
80
81
|
api: apiURL,
|
|
82
|
+
apiUrl: apiURL.toString(),
|
|
81
83
|
status: response.status,
|
|
82
84
|
});
|
|
83
85
|
}
|
|
@@ -89,7 +91,7 @@ const fetchRequest = () => {
|
|
|
89
91
|
}
|
|
90
92
|
catch (error) {
|
|
91
93
|
if (error instanceof Error) {
|
|
92
|
-
console.log(`Fetch Request Exception Error! -> ${apiURL} -> ${error.name} : ${error.message}`);
|
|
94
|
+
console.log(`Fetch Request Exception Error! -> ${apiURL.toString()} -> ${apiURL} -> ${error.name} : ${error.message}`);
|
|
93
95
|
return {
|
|
94
96
|
status: 500,
|
|
95
97
|
error: error.name,
|