Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify the 202 Accepted response in RunService API #2124

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

barreiro
Copy link
Collaborator

attempt to fix #2098. I don't have a test for this right now.

this change causes the generated horreum-web/src/generated/apis/RunApi.ts file to change from:

return await response.value();

to

switch (response.raw.status) {
  case 200:
    return await response.value();
  case 202:
    return null;
  default:
    return await response.value();
}

this should prevent the Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data error, reported in the issue, that prevents the dialog from closing.

also added a catch call to be double safe.

@barreiro barreiro self-assigned this Oct 24, 2024
@johnaohara johnaohara merged commit 69bdf59 into Hyperfoil:master Oct 25, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Elastic Search import window not closing when request accepted.
2 participants