Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Error when posting an object

Open
#8 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
50/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
ruby
Domain
backend

Research direction

Start in lib/microsoft_kiota_abstractions/request_information.rb at line 101, where set_content_from_parsable raises the NameError while posting an object. Reproduce the POST request and verify that content is assigned without the undefined this reference. Done means the object can be posted without this error.

Written by the indexing model from the issue text.

Description

/home/jasonjoh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/microsoft_kiota_abstractions-0.13.0/lib/microsoft_kiota_abstractions/request_information.rb:101:in set_content_from_parsable': undefined local variable or method this' for #<MicrosoftKiotaAbstractions::RequestInformation:0x00007feeaa6523e0 @headers=#<MicrosoftKiotaAbstractions::RequestHeaders:0x00007feeaa6523b8 @headers={"Accept"=>["application/json"], "Content-Type"=>["application/json"]}>, @query_parameters={}, @path_parameters={"baseurl"=>"https://jsonplaceholder.typicode.com"}, @url_template="{+baseurl}/posts{?userId*,title*}", @http_method=:POST> (NameError)

    this.content = writer.get_serialized_content();
    ^^^^

https://github.com/microsoft/kiota-abstractions-ruby/blob/feb925f02a35c159352f6da5be454b9c38d357c3/lib/microsoft_kiota_abstractions/request_information.rb#L101

I believe this should be changed to:

@content = writer.get_serialized_content();
Dominant language
Ruby
Stars
5
Forks
8
Avg merge
19h 44m
Merged PRs (30d)
25

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/kiota-ruby

All issues in microsoft/kiota-ruby

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.