improved error messages on Jira API 500
This commit is contained in:
parent
7b5c907533
commit
6d5e2e25d4
1 changed files with 8 additions and 3 deletions
|
|
@ -156,12 +156,17 @@ export class JiraClient {
|
|||
},
|
||||
);
|
||||
|
||||
if (response.status !== 200) {
|
||||
if (response.status === 500) {
|
||||
const text = await response.text();
|
||||
console.warn(
|
||||
"Unable to get jira tickets. Response code from API is",
|
||||
response.status,
|
||||
"Unable to get Jira tickets. You may need to set 'apiVersion': 2 in your config.json. See full documentation here: https://docs.continue.dev/customize/context-providers#jira-datacenter-support\n\n",
|
||||
text,
|
||||
);
|
||||
return Promise.resolve([]);
|
||||
} else if (response.status !== 200) {
|
||||
const text = await response.text();
|
||||
console.warn("Unable to get Jira tickets: ", text);
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
|
||||
const data = (await response.json()) as any;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue