-
Notifications
You must be signed in to change notification settings - Fork 319
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
Fix document download for JS client #1761
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Reviewed everything up to a492010 in 1 minute and 32 seconds
More details
- Looked at
86
lines of code in3
files - Skipped
2
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. js/sdk/src/baseClient.ts:63
- Draft comment:
Changing the default version from 'v2' to 'v3' might affect other parts of the application that rely on the default version. Ensure that all endpoints are compatible with 'v3'. - Reason this comment was not posted:
Confidence changes required:50%
The change in the version default from 'v2' to 'v3' is intentional and aligns with the PR title, which is about fixing document download for the JS client. This change should be correct as per the author's intent.
2. js/sdk/src/v3/clients/documents.ts:199
- Draft comment:
Consider removing or replacingconsole.log
statements with a proper logging mechanism for production. - Reason this comment was not posted:
Confidence changes required:50%
The console.log statements are useful for debugging but should be removed or replaced with a proper logging mechanism before production deployment.
Workflow ID: wflow_jX1Y0Rr2RYABNMK4
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
const contentType = | ||
response.headers?.["content-type"] || "application/octet-stream"; | ||
|
||
if (response.data instanceof Blob) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check if (response.data instanceof Blob)
is redundant because the responseType is set to 'arraybuffer'. This condition will never be true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on d42d12a in 22 seconds
More details
- Looked at
50
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. py/tests/rateLimit.bash:15
- Draft comment:
It's a best practice to quote variables to prevent issues with spaces or special characters. Consider quoting$count_503
and$REQUIRED_503_COUNT
here and elsewhere in the script. - Reason this comment was not posted:
Confidence changes required:50%
The script uses unquoted variables in some places, which can lead to issues if the variables contain spaces or special characters. It's a best practice to quote variables to prevent such issues.
Workflow ID: wflow_2P6zKj0pGQ6b3Brv
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Important
Fixes document download in JS client by updating response handling in
DocumentsClient
andBaseClient
, and modifies test script for HTTP 503 checks.DocumentsClient.download()
by changingresponseType
toarraybuffer
and handlingBlob
andArrayBuffer
types._makeRequest()
inBaseClient
to defaultversion
to "v3" and handleblob
response type.package.json
from0.4.8
to0.4.9
.rateLimit.bash
to check for HTTP 503 responses instead of 429.This description was created by for d42d12a. It will automatically update as commits are pushed.