digitalocean / digitalocean/droplet_kit
error handling
- Dominant language
- Ruby
- Stars
- 521
- Forks
- 151
- PR merge metrics
- No merged PRs in 30d
Description
hi
i want return DO errors as json for sample i create one droplet like this
`
"zoodfish", :@region=>"blah blah", :@size=>"512mb", :@image=>14782899, :@ipv6=>true, :@tags=>["namechip"], :@id=>nil, :@memory=>nil, :@vcpus=>nil, :@disk=>nil, :@locked=>nil, :@created_at=>nil, :@status=>nil, :@backup_ids=>nil, :@snapshot_ids=>nil, :@action_ids=>nil, :@features=>nil, :@networks=>nil, :@kernel=>nil, :@size_slug=>nil, :@names=>nil, :@volumes=>nil, :@ssh_keys=>nil, :@backups=>nil, :@monitoring=>nil, :@user_data=>nil, :@private_networking=>nil}>`
and DropletKit gem return this
```
DropletKit::FailedCreate: You specified an invalid region for Droplet creation.
from (irb):138
```
but i want make error response like this
`{status: 400,message: 'something worng OR else'}`
for sample status 400 point to invalid region
how can i make this response ?
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names DropletKit::FailedCreate and an invalid-region error but does not identify files or tests. Start by locating the exception and the client’s API response handling, then determine whether JSON status responses are intended to be exposed by the gem; done requires a documented, tested behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100