You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following API usage results in an Request-URI Too Large error:
MergeRequestDiscussions.create(projectId, mergeRequestId, body);
// Error: Request-URI Too Large
// at throwFailedRequestError ([...]/@gitbeaker/rest/dist/index.js:75:9)
Steps to reproduce
Create a Gitlab API instance with the host set to https://gitlab.com/api and a valid API token
Call MergeRequestDiscussions.create with a body of containing more than 10000 characters
See error
Expected behaviour
To have not resulted in an error, since the character limit seems to be way higher than 10k (I can manually place a comment with 610k characters).
Actual behaviour
An Request-URI Too Large error
Possible fixes
The request sent to Gitlab's REST API seems to append the body as a URI parameter, instead of sending it as an actual JSON body. Rewriting my code using the fetch API fixes this issue for me:
Description
The following API usage results in an Request-URI Too Large error:
Steps to reproduce
https://gitlab.com/api
and a valid API tokenMergeRequestDiscussions.create
with a body of containing more than 10000 charactersExpected behaviour
To have not resulted in an error, since the character limit seems to be way higher than 10k (I can manually place a comment with 610k characters).
Actual behaviour
An
Request-URI Too Large
errorPossible fixes
The request sent to Gitlab's REST API seems to append the body as a URI parameter, instead of sending it as an actual JSON body. Rewriting my code using the fetch API fixes this issue for me:
Checklist
The text was updated successfully, but these errors were encountered: