Project

General

Profile

Actions

Bug #3515

closed

Associated resources not found by ID causes 500 Internal Server Error

Added by Dominic Cleal about 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Description of problem:
making call of hammer cli:

`hammer --output base subnet create --name "allparams" --network "251.10.10.11" --mask "255.255.255.0" --gateway "251.10.10.255" --dns-primary "251.10.11.255" --dns-secondary "251.10.12.255" --from "251.10.10.10" --to "251.10.10.12" --vlanid "2" --domain-ids "1"` just fails with:
===
Could not create the subnet:
  Error: 500 Internal Server Error

Actual results:
500 - ISE

Expected results:
no exception. subnet needs to be created. Even if there is any error: proper message should be returned back.

Foreman production.log:

Started POST "/foreman/api/subnets" for 127.0.0.1 at 2013-10-25 06:23:19 -0400
Processing by Api::V1::SubnetsController#create as JSON
  Parameters: {"subnet"=>{"dns_secondary"=>"251.10.12.255", "network"=>"251.10.10.11", "from"=>"251.10.10.10", "mask"=>"255.255.255.0", "vlanid"=>"2", "to"=>"251.10.10.12", "domain_ids"=>["1"], "gateway"=>"251.10.10.255", "dns_primary"=>"251.10.11.255", "name"=>"allparams"}}
Authorized user admin(Admin User)
Couldn't find Domain with id=1 (ActiveRecord::RecordNotFound)

(https://bugzilla.redhat.com/show_bug.cgi?id=1023393)


Related issues 1 (0 open1 closed)

Blocks Hammer CLI - Bug #3915: Hammer does not handle 404s wellClosedTomáš Strachota12/18/2013Actions
Actions

Also available in: Atom PDF