Actions
Bug #16813
closedConfusing error message on association not found error
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1379006
Description of problem:
When association can't be found we don't render proper error message. For example if I use pxelinux instead of PXELinux template kind like this
curl -X POST https://admin:changeme@foreman.example.tst/api/config_templates -H 'Content-Type: application/json' -H 'ForemanApiVersion: 2' -d '{"config_template": { "name":"b", "template":"b","template_kind_name":"pxelinux" }}'
it renders
{
"error": {"message":"Resource config_template not found by id ''"}
}
While I would expect something like "Could not find template_kind with name: pxelinux". We should detect that the RecordNotFound
exception was triggered in has_many_common and adjust the error message accordingly.
Note that the original BZ was partly fixed by #13704 which fixed the backtrace but the error message remain confusing.
Updated by Marek Hulán about 8 years ago
- Subject changed from Confusing error message on association not found error to Confusing error message on association not found error
- Status changed from New to Assigned
- Assignee set to Marek Hulán
- Target version set to 1.5.0
not sure about proper category, please feel free to change
Updated by Marek Hulán about 8 years ago
- Related to Bug #13704: Error when updating host location by name through API added
Updated by The Foreman Bot about 8 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3923 added
Updated by Dominic Cleal about 8 years ago
- Category changed from Unattended installations to API
- Translation missing: en.field_release set to 190
Updated by Marek Hulán about 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset ead67f0d679311187b6e6f9064a1d0bf3df70075.
Updated by Dominic Cleal about 8 years ago
- Has duplicate Bug #16846: Org create returns unclear message when trying to assign a non-existent subnet added
Updated by Dominic Cleal about 8 years ago
- Has duplicate deleted (Bug #16846: Org create returns unclear message when trying to assign a non-existent subnet)
Updated by Dominic Cleal about 8 years ago
- Related to Bug #16846: Org create returns unclear message when trying to assign a non-existent subnet added
Actions