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
hi
i want return DO errors as json for sample i create one droplet like this <DropletKit::Droplet {:@name=>"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 ?
The text was updated successfully, but these errors were encountered:
hi
i want return DO errors as json for sample i create one droplet like this
<DropletKit::Droplet {:@name=>"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
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 ?
The text was updated successfully, but these errors were encountered: