We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8e3bbb commit 54650f8Copy full SHA for 54650f8
1 file changed
src/lib/contentstack-core.ts
@@ -14,13 +14,16 @@ export function httpClient(options: HttpClientParams): AxiosInstance {
14
httpsAgent: false,
15
timeout: 30000,
16
logHandler: (level: string, data?: any) => {
17
- if (level === 'error' && data) {
18
- const title = [data.name, data.message].filter((a) => a).join(' - ');
19
- console.error(`[error] ${title}`);
20
-
+ if (level === 'error') {
+ if (data) {
+ const title = [data.name, data.message].filter((a) => a).join(' - ');
+ console.error(`[error] ${title}`);
21
+ }
22
return;
23
}
- console.log(`[${level}] ${data}`);
24
+ if (data !== undefined) {
25
+ console.log(`[${level}] ${data}`);
26
27
},
28
retryCondition: (error: any) => {
29
if (error.response && error.response.status === 429) {
0 commit comments