Skip to content

Commit 4adc1a3

Browse files
MrRefactoring#215 isAxiosError detecting mechanism improved (MrRefactoring#216)
1 parent 6ba8172 commit 4adc1a3

File tree

4 files changed

+91
-87
lines changed

4 files changed

+91
-87
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Jira.js changelog
22

3+
### 2.15.2
4+
5+
- `isAxiosError` detecting mechanism improved. Thanks [Stephane Moser](https://github.com/Moser-ss) for the report.
6+
37
### 2.15.1
48

59
- ServiceDesk for experimental API `'X-ExperimentalApi': 'opt-in'` header added.

package-lock.json

Lines changed: 85 additions & 85 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jira.js",
3-
"version": "2.15.1",
3+
"version": "2.15.2",
44
"description": "jira.js is a powerful Node.JS/Browser module that allows you to interact with the Jira API very easily",
55
"main": "out/index.js",
66
"types": "out/index.d.ts",

src/clients/baseClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export class BaseClient implements Client {
105105

106106
return responseHandler(response.data);
107107
} catch (e: any) {
108-
const err = this.config.newErrorHandling && e.isAxiosError ? e.response.data : e;
108+
const err = this.config.newErrorHandling && axios.isAxiosError(e) && e.response ? e.response.data : e;
109109

110110
const callbackErrorHandler = callback && ((error: Config.Error) => callback(error));
111111
const defaultErrorHandler = (error: Error) => {

0 commit comments

Comments
 (0)