danmurphy1217 / danmurphy1217/notion-ruby
Error in extract_collection_schema method
- Dominant language
- Ruby
- Stars
- 70
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to add a column with the `add_property` method but it returns an error.
I am getting the same error when I call `rows` on collection.
```
irb(main):004:0> notion_page.add_property('TEST', 'url')
Traceback (most recent call last):
2: from (irb):3
1: from (irb):4:in `rescue in irb_binding'
NoMethodError (undefined method `[]' for nil:NilClass)
irb(main):005:0>
```
Looks like POST request in `extract_collection_schema` is invalid, it is returning validation error.
```
response.body
"{\"errorId\":\"83f22b07-f9c5-4247-a2bf-96c20799a974\",\"name\":\"ValidationError\",\"message\":\"Invalid input.\"}"
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing extract_collection_schema, then reproduce the add_property and rows calls shown in the issue while inspecting response.body. Compare the POST request with the validation error and verify that both calls complete without the reported NoMethodError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100