)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"237bb6d4f8e2a463bacdbd82ba5fd31710f9a41d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Provide detailed error information for placement API"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This blueprint is an attampt for providing additional information in"},{"line_number":10,"context_line":"case of error for GET/PUT/POST/DELETE methods for several placement"},{"line_number":11,"context_line":"endpoints. This information can be used on the clinet side for"},{"line_number":12,"context_line":"distinguish what casue was in case of same response HTTP code."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a57fde8_1ae3dda4","line":9,"updated":"2017-01-13 16:55:29.000000000","message":"attempt","commit_id":"ee1f25519737348a03f7845ab9f26ae4e488b66c"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"237bb6d4f8e2a463bacdbd82ba5fd31710f9a41d","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This blueprint is an attampt for providing additional information in"},{"line_number":10,"context_line":"case of error for GET/PUT/POST/DELETE methods for several placement"},{"line_number":11,"context_line":"endpoints. This information can be used on the clinet side for"},{"line_number":12,"context_line":"distinguish what casue was in case of same response HTTP code."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Id644f9f509ab382afe155cca0babf08a53d66338"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a57fde8_3aeee18b","line":11,"updated":"2017-01-13 16:55:29.000000000","message":"client\n\ns/for/to/","commit_id":"ee1f25519737348a03f7845ab9f26ae4e488b66c"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"237bb6d4f8e2a463bacdbd82ba5fd31710f9a41d","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This blueprint is an attampt for providing additional information in"},{"line_number":10,"context_line":"case of error for GET/PUT/POST/DELETE methods for several placement"},{"line_number":11,"context_line":"endpoints. This information can be used on the clinet side for"},{"line_number":12,"context_line":"distinguish what casue was in case of same response HTTP code."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Id644f9f509ab382afe155cca0babf08a53d66338"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a57fde8_7ae8697d","line":12,"updated":"2017-01-13 16:55:29.000000000","message":"distinguish what caused an error in the event of the same HTTP response code","commit_id":"ee1f25519737348a03f7845ab9f26ae4e488b66c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"22a2946e208ccc20fda934615b81a0a87cf364ce","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Provide error codes for placement API"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This blueprint is an for providing additional information in case of"},{"line_number":10,"context_line":"error for GET/PUT/POST/DELETE methods for several placement endpoints."},{"line_number":11,"context_line":"This information can be used on the client side to distinguish what"},{"line_number":12,"context_line":"caused an error in the event of the same HTTP response code."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3fa0c359_32c3b859","line":9,"range":{"start_line":9,"start_character":15,"end_line":9,"end_character":20},"updated":"2018-02-20 18:40:21.000000000","message":"How about \"is a framework\"?","commit_id":"0b3007e157266ab56b4575f3f9b6aaba25797585"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"22a2946e208ccc20fda934615b81a0a87cf364ce","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Provide error codes for placement API"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This blueprint is an for providing additional information in case of"},{"line_number":10,"context_line":"error for GET/PUT/POST/DELETE methods for several placement endpoints."},{"line_number":11,"context_line":"This information can be used on the client side to distinguish what"},{"line_number":12,"context_line":"caused an error in the event of the same HTTP response code."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3fa0c359_92a72cbd","line":10,"range":{"start_line":10,"start_character":42,"end_line":10,"end_character":49},"updated":"2018-02-20 18:40:21.000000000","message":"...and strike this.  If the bp is about framework, we can make this sentence generic.","commit_id":"0b3007e157266ab56b4575f3f9b6aaba25797585"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"22a2946e208ccc20fda934615b81a0a87cf364ce","unresolved":false,"context_lines":[{"line_number":17,"context_line":"* It removes the requirement to implement the help link, suggesting"},{"line_number":18,"context_line":"  we do that later."},{"line_number":19,"context_line":"* It adjusts the emphasis to being development of a framework rather"},{"line_number":20,"context_line":"  that complete overhaul of existing responses."},{"line_number":21,"context_line":"* Add links to:"},{"line_number":22,"context_line":"    * a WIP of how to do it"},{"line_number":23,"context_line":"    * placement api-ref"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3fa0c359_b2aca89f","line":20,"range":{"start_line":20,"start_character":2,"end_line":20,"end_character":6},"updated":"2018-02-20 18:40:21.000000000","message":"than a","commit_id":"0b3007e157266ab56b4575f3f9b6aaba25797585"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cf267e93f5d588487e8bcfcd47164f41c2ab2a0b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"Parent:     aa9cddfc (Merge \"Add placement-req-filter spec\")"},{"line_number":2,"context_line":"Author:     gryf \u003cgryf73@gmail.com\u003e"},{"line_number":3,"context_line":"AuthorDate: 2017-01-05 13:12:46 +0100"},{"line_number":4,"context_line":"Commit:     Chris Dent \u003ccdent@anticdent.org\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"df7087c5_3ac46292","line":1,"updated":"2018-03-19 12:23:54.000000000","message":"Please tag blueprint in commit message","commit_id":"e48e836b0cfb657579db33ab34fb73ae96aecbf9"}],"specs/pike/approved/placement-api-error-handling.rst":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"237bb6d4f8e2a463bacdbd82ba5fd31710f9a41d","unresolved":false,"context_lines":[{"line_number":77,"context_line":"  {"},{"line_number":78,"context_line":"    \"errors\": ["},{"line_number":79,"context_line":"      {"},{"line_number":80,"context_line":"        \"code\": \"compute.resource_providers.create_failed\","},{"line_number":81,"context_line":"        \"status\": 409,"},{"line_number":82,"context_line":"        \"title\": \"Resource couldn\u0027t be created\","},{"line_number":83,"context_line":"        \"detail\": \"Resource with the name `%(name)s\u0027 already exists.\","}],"source_content_type":"text/x-rst","patch_set":2,"id":"7a3c09a3_2e65e7e0","line":80,"updated":"2017-01-13 16:55:29.000000000","message":"this should probably be \u0027placement.resource_providers.\u003csomething\u003e\u0027 because the service type involved is placement, not compute\n\nI suspect there\u0027s room for some discussion (in the api-wg) on how to make \u003csomething\u003e consistent.","commit_id":"ee1f25519737348a03f7845ab9f26ae4e488b66c"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"df10ad74b41fc53ab702572344dc1c37eb341796","unresolved":false,"context_lines":[{"line_number":77,"context_line":"  {"},{"line_number":78,"context_line":"    \"errors\": ["},{"line_number":79,"context_line":"      {"},{"line_number":80,"context_line":"        \"code\": \"compute.resource_providers.create_failed\","},{"line_number":81,"context_line":"        \"status\": 409,"},{"line_number":82,"context_line":"        \"title\": \"Resource couldn\u0027t be created\","},{"line_number":83,"context_line":"        \"detail\": \"Resource with the name `%(name)s\u0027 already exists.\","}],"source_content_type":"text/x-rst","patch_set":2,"id":"7a3c09a3_7459275a","line":80,"in_reply_to":"7a3c09a3_2e65e7e0","updated":"2017-01-16 08:06:37.000000000","message":"Right. I wasn\u0027t sure how code should look like. Will change to \u0027placement\u0027 instead compute. As for \u0027\u003csomething\u003e\u0027 - doesn\u0027t it depend on actual error and might be virtually anything?","commit_id":"ee1f25519737348a03f7845ab9f26ae4e488b66c"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"237bb6d4f8e2a463bacdbd82ba5fd31710f9a41d","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        \"links\": ["},{"line_number":85,"context_line":"          {"},{"line_number":86,"context_line":"            \"rel\": \"help\","},{"line_number":87,"context_line":"            \"href\": \"http://specs.openstack.org/openstack/nova-specs/specs/newton/implemented/generic-resource-pools.html?highlight\u003dresource%20pools#post-resource-providers\""},{"line_number":88,"context_line":"          }"},{"line_number":89,"context_line":"        ]"},{"line_number":90,"context_line":"      }"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7a3c09a3_8ecfbbb2","line":87,"updated":"2017-01-13 16:55:29.000000000","message":"when the placement-api-ref is done I guess we would make these links point there","commit_id":"ee1f25519737348a03f7845ab9f26ae4e488b66c"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"df10ad74b41fc53ab702572344dc1c37eb341796","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        \"links\": ["},{"line_number":85,"context_line":"          {"},{"line_number":86,"context_line":"            \"rel\": \"help\","},{"line_number":87,"context_line":"            \"href\": \"http://specs.openstack.org/openstack/nova-specs/specs/newton/implemented/generic-resource-pools.html?highlight\u003dresource%20pools#post-resource-providers\""},{"line_number":88,"context_line":"          }"},{"line_number":89,"context_line":"        ]"},{"line_number":90,"context_line":"      }"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7a3c09a3_3426bfce","line":87,"in_reply_to":"7a3c09a3_8ecfbbb2","updated":"2017-01-16 08:06:37.000000000","message":"+1","commit_id":"ee1f25519737348a03f7845ab9f26ae4e488b66c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c85848afabea93520153abe67c993aac68713fb8","unresolved":false,"context_lines":[{"line_number":8,"context_line":"Placement API error handling"},{"line_number":9,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Include the URL of your launchpad blueprint:"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"https://blueprints.launchpad.net/nova/+spec/placement-api-error-handling"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a461143_0745306f","line":11,"range":{"start_line":11,"start_character":0,"end_line":11,"end_character":44},"updated":"2017-01-26 16:12:07.000000000","message":"nit: don\u0027t think you need to keep this","commit_id":"d4708ff847c979278baf0aeffa9fa89eda9bdc40"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"0dc5632828de2624db66a34120217001485a3ac6","unresolved":false,"context_lines":[{"line_number":8,"context_line":"Placement API error handling"},{"line_number":9,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Include the URL of your launchpad blueprint:"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"https://blueprints.launchpad.net/nova/+spec/placement-api-error-handling"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a30ddce_ad4a72aa","line":11,"range":{"start_line":11,"start_character":0,"end_line":11,"end_character":44},"in_reply_to":"3a461143_0745306f","updated":"2017-03-08 14:18:45.000000000","message":"Done","commit_id":"d4708ff847c979278baf0aeffa9fa89eda9bdc40"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c85848afabea93520153abe67c993aac68713fb8","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"https://blueprints.launchpad.net/nova/+spec/placement-api-error-handling"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This blueprint aim is to provide, besides the HTTP response code, an"},{"line_number":16,"context_line":"information in JSON format for certain situations in consistent way, in the"},{"line_number":17,"context_line":"response body."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Problem description"},{"line_number":20,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a461143_6a3ddbba","line":17,"range":{"start_line":15,"start_character":0,"end_line":17,"end_character":14},"updated":"2017-01-26 16:12:07.000000000","message":"nit: this is worded oddly. Could we try something like this\n\n\u003e This blueprints aims to extend the API to include detailed, consistent error messages in the response body.","commit_id":"d4708ff847c979278baf0aeffa9fa89eda9bdc40"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"0dc5632828de2624db66a34120217001485a3ac6","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"https://blueprints.launchpad.net/nova/+spec/placement-api-error-handling"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This blueprint aim is to provide, besides the HTTP response code, an"},{"line_number":16,"context_line":"information in JSON format for certain situations in consistent way, in the"},{"line_number":17,"context_line":"response body."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Problem description"},{"line_number":20,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a30ddce_ecb55a31","line":17,"range":{"start_line":15,"start_character":0,"end_line":17,"end_character":14},"in_reply_to":"3a461143_6a3ddbba","updated":"2017-03-08 14:18:45.000000000","message":"Yup. I like that, thank you.","commit_id":"d4708ff847c979278baf0aeffa9fa89eda9bdc40"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c85848afabea93520153abe67c993aac68713fb8","unresolved":false,"context_lines":[{"line_number":44,"context_line":"case of abnormal cases which will contain an well-defined structure, which can"},{"line_number":45,"context_line":"help consumers of the API to easily recognize type of the error cases. Format"},{"line_number":46,"context_line":"of the response payload will match API Working Group guide, as described in"},{"line_number":47,"context_line":"http://specs.openstack.org/openstack/api-wg/guidelines/errors.html."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"Alternatives"},{"line_number":50,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a461143_8a63e7db","line":47,"updated":"2017-01-26 16:12:07.000000000","message":"side note: IMO, Twitter do this extremely well https://dev.twitter.com/overview/api/response-codes","commit_id":"d4708ff847c979278baf0aeffa9fa89eda9bdc40"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"0dc5632828de2624db66a34120217001485a3ac6","unresolved":false,"context_lines":[{"line_number":44,"context_line":"case of abnormal cases which will contain an well-defined structure, which can"},{"line_number":45,"context_line":"help consumers of the API to easily recognize type of the error cases. Format"},{"line_number":46,"context_line":"of the response payload will match API Working Group guide, as described in"},{"line_number":47,"context_line":"http://specs.openstack.org/openstack/api-wg/guidelines/errors.html."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"Alternatives"},{"line_number":50,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a30ddce_7be1159a","line":47,"in_reply_to":"3a461143_8a63e7db","updated":"2017-03-08 14:18:45.000000000","message":"There are several attempts out there for shaping response meaning in case of errors. Besides leveraging http protocol, there are other ways - like enclosing error situation in response, which always return http response code 200, but errors are exposed in json response - IIRC slack follows that convention.\n\nWhat I tried to follow here is a consistency between all services in OpenStack ecosystem, that\u0027s why I follow API-WG guidelines here.","commit_id":"d4708ff847c979278baf0aeffa9fa89eda9bdc40"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c85848afabea93520153abe67c993aac68713fb8","unresolved":false,"context_lines":[{"line_number":50,"context_line":"------------"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"We can keep things as it is, and examine returned messages from the API"},{"line_number":53,"context_line":"response for indicating what the cause was for certain error, although that"},{"line_number":54,"context_line":"approach have its own issues, like inability to use translated messages, and"},{"line_number":55,"context_line":"force operators for using specific i18n environment."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a461143_ea854b59","line":54,"range":{"start_line":53,"start_character":60,"end_line":54,"end_character":13},"updated":"2017-01-26 16:12:07.000000000","message":"nit: Perhaps:\n\n  error. This has its own issues, such as the inability...","commit_id":"d4708ff847c979278baf0aeffa9fa89eda9bdc40"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"0dc5632828de2624db66a34120217001485a3ac6","unresolved":false,"context_lines":[{"line_number":50,"context_line":"------------"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"We can keep things as it is, and examine returned messages from the API"},{"line_number":53,"context_line":"response for indicating what the cause was for certain error, although that"},{"line_number":54,"context_line":"approach have its own issues, like inability to use translated messages, and"},{"line_number":55,"context_line":"force operators for using specific i18n environment."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a30ddce_d6265867","line":54,"range":{"start_line":53,"start_character":60,"end_line":54,"end_character":13},"in_reply_to":"3a461143_ea854b59","updated":"2017-03-08 14:18:45.000000000","message":"Done","commit_id":"d4708ff847c979278baf0aeffa9fa89eda9bdc40"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c85848afabea93520153abe67c993aac68713fb8","unresolved":false,"context_lines":[{"line_number":62,"context_line":"REST API impact"},{"line_number":63,"context_line":"---------------"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"Placement API calls, as described in blueprint `generic-resource-pools` are"},{"line_number":66,"context_line":"intact, with exception of returned response for `PUT`, `DELETE` and `POST`"},{"line_number":67,"context_line":"methods on unsuccessful cases. New microversion will be created."},{"line_number":68,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a461143_8a91279c","line":65,"range":{"start_line":65,"start_character":37,"end_line":65,"end_character":71},"updated":"2017-01-26 16:12:07.000000000","message":"Does this link automatically? If not, could we add a link?","commit_id":"d4708ff847c979278baf0aeffa9fa89eda9bdc40"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"0dc5632828de2624db66a34120217001485a3ac6","unresolved":false,"context_lines":[{"line_number":62,"context_line":"REST API impact"},{"line_number":63,"context_line":"---------------"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"Placement API calls, as described in blueprint `generic-resource-pools` are"},{"line_number":66,"context_line":"intact, with exception of returned response for `PUT`, `DELETE` and `POST`"},{"line_number":67,"context_line":"methods on unsuccessful cases. New microversion will be created."},{"line_number":68,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a30ddce_b62f243d","line":65,"range":{"start_line":65,"start_character":37,"end_line":65,"end_character":71},"in_reply_to":"3a461143_8a91279c","updated":"2017-03-08 14:18:45.000000000","message":"Done","commit_id":"d4708ff847c979278baf0aeffa9fa89eda9bdc40"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c85848afabea93520153abe67c993aac68713fb8","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"The API changes for the all endpoints within response for error situations."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"`POST /resource_providers`"},{"line_number":72,"context_line":"++++++++++++++++++++++++++"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"The response in case of `409 Conflict` will become::"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a461143_2a459316","line":71,"range":{"start_line":71,"start_character":0,"end_line":71,"end_character":26},"updated":"2017-01-26 16:12:07.000000000","message":"nit: I don\u0027t know if these should be formatted like so. I\u0027d make them ``code`` (double backticks in rST) or leave that as they are (headers are already bold)","commit_id":"d4708ff847c979278baf0aeffa9fa89eda9bdc40"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"0dc5632828de2624db66a34120217001485a3ac6","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"The API changes for the all endpoints within response for error situations."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"`POST /resource_providers`"},{"line_number":72,"context_line":"++++++++++++++++++++++++++"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"The response in case of `409 Conflict` will become::"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a30ddce_2d9da259","line":71,"range":{"start_line":71,"start_character":0,"end_line":71,"end_character":26},"in_reply_to":"3a461143_2a459316","updated":"2017-03-08 14:18:45.000000000","message":"Actually in reST it means `interpreted text`[1], so it is perfectly fine to use it as is. Also, please notice, that this is a title level 3 (if my math is right).\n\n[2] http://docutils.sourceforge.net/docs/user/rst/quickref.html#inline-markup","commit_id":"d4708ff847c979278baf0aeffa9fa89eda9bdc40"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c85848afabea93520153abe67c993aac68713fb8","unresolved":false,"context_lines":[{"line_number":72,"context_line":"++++++++++++++++++++++++++"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"The response in case of `409 Conflict` will become::"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"  Content-Type: application/json"},{"line_number":77,"context_line":"  {"},{"line_number":78,"context_line":"    \"errors\": ["}],"source_content_type":"text/x-rst","patch_set":3,"id":"3a461143_6a6ebb97","line":75,"updated":"2017-01-26 16:12:07.000000000","message":"Could you provide an example of what this looked like beforehand?","commit_id":"d4708ff847c979278baf0aeffa9fa89eda9bdc40"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"0dc5632828de2624db66a34120217001485a3ac6","unresolved":false,"context_lines":[{"line_number":72,"context_line":"++++++++++++++++++++++++++"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"The response in case of `409 Conflict` will become::"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"  Content-Type: application/json"},{"line_number":77,"context_line":"  {"},{"line_number":78,"context_line":"    \"errors\": ["}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a30ddce_2debe2b1","line":75,"in_reply_to":"3a461143_6a6ebb97","updated":"2017-03-08 14:18:45.000000000","message":"Like in the BP? According to Generic resource providers[1] blueprint it was just a HTTP return code 409 without any body.\n\n[1] https://specs.openstack.org/openstack/nova-specs/specs/newton/implemented/generic-resource-pools.html#post-resource-providers","commit_id":"d4708ff847c979278baf0aeffa9fa89eda9bdc40"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"67c27b6f488d4cef437d46b739d8aef6c6e1bdff","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/placement-api-error-handling"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This blueprints aims to extend the API to include detailed, consistent error"},{"line_number":14,"context_line":"messages in the response body."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9a30ddce_19008065","line":13,"updated":"2017-03-13 16:02:11.000000000","message":"blueprint","commit_id":"b5996ba21246da2120278fac6e3189400ef0e53c"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"6cb75cdaa0ad179f1974f6dadba8714a1a3db006","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/placement-api-error-handling"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This blueprints aims to extend the API to include detailed, consistent error"},{"line_number":14,"context_line":"messages in the response body."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a1ff146_92e6c4b2","line":13,"in_reply_to":"9a30ddce_19008065","updated":"2017-03-15 20:06:44.000000000","message":"Done","commit_id":"b5996ba21246da2120278fac6e3189400ef0e53c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"195ad77f14151d57458c3e7a394e3e91113063b1","unresolved":false,"context_lines":[{"line_number":63,"context_line":"intact, with exception of returned response for `PUT`, `DELETE` and `POST`"},{"line_number":64,"context_line":"methods on unsuccessful cases. New microversion will be created."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"The API changes for the all endpoints within response for error situations."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"`POST /resource_providers`"},{"line_number":69,"context_line":"++++++++++++++++++++++++++"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a1ff146_7aadd687","line":66,"updated":"2017-03-14 18:21:35.000000000","message":"This is all changing in a new microversion I guess? And we keep the current structure for existing errors?","commit_id":"b5996ba21246da2120278fac6e3189400ef0e53c"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"6cb75cdaa0ad179f1974f6dadba8714a1a3db006","unresolved":false,"context_lines":[{"line_number":63,"context_line":"intact, with exception of returned response for `PUT`, `DELETE` and `POST`"},{"line_number":64,"context_line":"methods on unsuccessful cases. New microversion will be created."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"The API changes for the all endpoints within response for error situations."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"`POST /resource_providers`"},{"line_number":69,"context_line":"++++++++++++++++++++++++++"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a1ff146_b28f40cb","line":66,"in_reply_to":"3a1ff146_7aadd687","updated":"2017-03-15 20:06:44.000000000","message":"Yes, presented changes will go into new microversion. Not sure what do you mean by keeping current structure for existing errors.","commit_id":"b5996ba21246da2120278fac6e3189400ef0e53c"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"67c27b6f488d4cef437d46b739d8aef6c6e1bdff","unresolved":false,"context_lines":[{"line_number":74,"context_line":"  {"},{"line_number":75,"context_line":"    \"errors\": ["},{"line_number":76,"context_line":"      {"},{"line_number":77,"context_line":"        \"code\": \"placement.resource_providers.create_failed\","},{"line_number":78,"context_line":"        \"status\": 409,"},{"line_number":79,"context_line":"        \"title\": \"Resource couldn\u0027t be created\","},{"line_number":80,"context_line":"        \"detail\": \"Resource with the name `%(name)s\u0027 already exists.\","}],"source_content_type":"text/x-rst","patch_set":4,"id":"9a30ddce_59d918f2","line":77,"updated":"2017-03-13 16:02:11.000000000","message":"Isn\u0027t create_failed is too generic here?\n\nCreate could fail because the name was poorly formed (which would be a 400).\n\nOn what axis or axis do we need these codes to be unique:\n\n* per response status code\n* across all response status codes\n\n?","commit_id":"b5996ba21246da2120278fac6e3189400ef0e53c"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"6cb75cdaa0ad179f1974f6dadba8714a1a3db006","unresolved":false,"context_lines":[{"line_number":74,"context_line":"  {"},{"line_number":75,"context_line":"    \"errors\": ["},{"line_number":76,"context_line":"      {"},{"line_number":77,"context_line":"        \"code\": \"placement.resource_providers.create_failed\","},{"line_number":78,"context_line":"        \"status\": 409,"},{"line_number":79,"context_line":"        \"title\": \"Resource couldn\u0027t be created\","},{"line_number":80,"context_line":"        \"detail\": \"Resource with the name `%(name)s\u0027 already exists.\","}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a1ff146_b5300aea","line":77,"in_reply_to":"9a30ddce_59d918f2","updated":"2017-03-15 20:06:44.000000000","message":"I guess you\u0027re right - `create_failed` is totally too generic for 409 code. Maybe something like `resource_exists` would be more appropriate?\n\nThere was no clue in API WG guidelines how codes should be organized. I\u0027ve assumed, that this verbose \"code\" (or string in this case) should be unique across all responses within certain service, so the latter one.\n\nAnother thought is, I maybe overdo the code prefix, and simply \u0027placement\u0027 instead of \u0027placement.resource_providers\u0027 would be enough followed by error label/code.","commit_id":"b5996ba21246da2120278fac6e3189400ef0e53c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"195ad77f14151d57458c3e7a394e3e91113063b1","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        \"links\": ["},{"line_number":82,"context_line":"          {"},{"line_number":83,"context_line":"            \"rel\": \"help\","},{"line_number":84,"context_line":"            \"href\": \"http://specs.openstack.org/openstack/nova-specs/specs/newton/implemented/generic-resource-pools.html?highlight\u003dresource%20pools#post-resource-providers\""},{"line_number":85,"context_line":"          }"},{"line_number":86,"context_line":"        ]"},{"line_number":87,"context_line":"      }"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a1ff146_faaaa684","line":84,"updated":"2017-03-14 18:21:35.000000000","message":"I guess I always assumed we should link to the api-ref:\nhttps://developer.openstack.org/api-ref/placement/ (or whatever it becomes)?\n\nWe probably need to get that fixed ASAP.","commit_id":"b5996ba21246da2120278fac6e3189400ef0e53c"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"6cb75cdaa0ad179f1974f6dadba8714a1a3db006","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        \"links\": ["},{"line_number":82,"context_line":"          {"},{"line_number":83,"context_line":"            \"rel\": \"help\","},{"line_number":84,"context_line":"            \"href\": \"http://specs.openstack.org/openstack/nova-specs/specs/newton/implemented/generic-resource-pools.html?highlight\u003dresource%20pools#post-resource-providers\""},{"line_number":85,"context_line":"          }"},{"line_number":86,"context_line":"        ]"},{"line_number":87,"context_line":"      }"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a1ff146_753bf238","line":84,"in_reply_to":"3a1ff146_faaaa684","updated":"2017-03-15 20:06:44.000000000","message":"I wasn\u0027t sure how link to particular anchor in html document in API ref, since it doesn\u0027t exists during drafting this document. The first shot was to link to the BP which is already available, bearing in mind, that we eventually will amend this blueprint with the one which would have appropriate links to the real placement API reference :)","commit_id":"b5996ba21246da2120278fac6e3189400ef0e53c"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"6cacbb5c6f212b39bbd599e47de20fb418d8105c","unresolved":false,"context_lines":[{"line_number":60,"context_line":"---------------"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Placement API calls, as described in blueprint `generic-resource-pools` [2] are"},{"line_number":63,"context_line":"intact, with exception of returned response for `PUT`, `DELETE` and `POST`"},{"line_number":64,"context_line":"methods on unsuccessful cases. New microversion will be created."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"The API changes for the all endpoints within response for error situations."}],"source_content_type":"text/x-rst","patch_set":5,"id":"3a1ff146_58bffbfa","line":63,"updated":"2017-03-16 08:19:54.000000000","message":"you have error sample at line 91, but no GET method here..","commit_id":"4e50dcbe4c89fe6be3fcbc00c8e505703677468e"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"d9b1699e5ff6a6b175ec5adecf90e2ea8f11ac02","unresolved":false,"context_lines":[{"line_number":60,"context_line":"---------------"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Placement API calls, as described in blueprint `generic-resource-pools` [2] are"},{"line_number":63,"context_line":"intact, with exception of returned response for `PUT`, `DELETE` and `POST`"},{"line_number":64,"context_line":"methods on unsuccessful cases. New microversion will be created."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"The API changes for the all endpoints within response for error situations."}],"source_content_type":"text/x-rst","patch_set":5,"id":"1a1ced50_aa31b5ee","line":63,"in_reply_to":"3a1ff146_58bffbfa","updated":"2017-03-17 08:29:11.000000000","message":"Done","commit_id":"4e50dcbe4c89fe6be3fcbc00c8e505703677468e"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"6cacbb5c6f212b39bbd599e47de20fb418d8105c","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        \"code\": \"placement.resource_providers.create_failed\","},{"line_number":78,"context_line":"        \"status\": 409,"},{"line_number":79,"context_line":"        \"title\": \"Resource couldn\u0027t be created\","},{"line_number":80,"context_line":"        \"detail\": \"Resource with the name `%(name)s\u0027 already exists.\","},{"line_number":81,"context_line":"        \"links\": ["},{"line_number":82,"context_line":"          {"},{"line_number":83,"context_line":"            \"rel\": \"help\","}],"source_content_type":"text/x-rst","patch_set":5,"id":"3a1ff146_18de636d","line":80,"range":{"start_line":80,"start_character":42,"end_line":80,"end_character":52},"updated":"2017-03-16 08:19:54.000000000","message":"typo","commit_id":"4e50dcbe4c89fe6be3fcbc00c8e505703677468e"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"d9b1699e5ff6a6b175ec5adecf90e2ea8f11ac02","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        \"code\": \"placement.resource_providers.create_failed\","},{"line_number":78,"context_line":"        \"status\": 409,"},{"line_number":79,"context_line":"        \"title\": \"Resource couldn\u0027t be created\","},{"line_number":80,"context_line":"        \"detail\": \"Resource with the name `%(name)s\u0027 already exists.\","},{"line_number":81,"context_line":"        \"links\": ["},{"line_number":82,"context_line":"          {"},{"line_number":83,"context_line":"            \"rel\": \"help\","}],"source_content_type":"text/x-rst","patch_set":5,"id":"1a1ced50_2a5ce524","line":80,"range":{"start_line":80,"start_character":42,"end_line":80,"end_character":52},"in_reply_to":"3a1ff146_18de636d","updated":"2017-03-17 08:29:11.000000000","message":"I can\u0027t see any typos there. Could you specify what exactly you mean by that?","commit_id":"4e50dcbe4c89fe6be3fcbc00c8e505703677468e"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"ceeeac96719e0484e5edabb588770883f855e0f2","unresolved":false,"context_lines":[{"line_number":948,"context_line":"Work Items"},{"line_number":949,"context_line":"----------"},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"* Modify REST API controller for resource providers to return JSON response"},{"line_number":952,"context_line":"* openstackclient update"},{"line_number":953,"context_line":"* Documentation update"},{"line_number":954,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"3a1ff146_59229a02","line":951,"updated":"2017-03-16 11:05:19.000000000","message":"They already do return a JSON response, see: https://github.com/openstack/nova/blob/d83386524b07cf9da038dae4d487f6a234918e6c/nova/api/openstack/placement/util.py#L86\n\nThey only do that, though, when the accept header is application/json. This is because webob\u0027s wsgify decorator will transform exceptions into a valid repsonse, formatted based on the the accept header.\n\nSo the thing to do is to add support for adding the error code to that existing structure.","commit_id":"4e50dcbe4c89fe6be3fcbc00c8e505703677468e"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"d9b1699e5ff6a6b175ec5adecf90e2ea8f11ac02","unresolved":false,"context_lines":[{"line_number":948,"context_line":"Work Items"},{"line_number":949,"context_line":"----------"},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"* Modify REST API controller for resource providers to return JSON response"},{"line_number":952,"context_line":"* openstackclient update"},{"line_number":953,"context_line":"* Documentation update"},{"line_number":954,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"1a1ced50_6f226fbb","line":951,"in_reply_to":"3a1ff146_59229a02","updated":"2017-03-17 08:29:11.000000000","message":"Oh, that\u0027s great! Completely agree, that it\u0027s a good place to be expanded with additional information.","commit_id":"4e50dcbe4c89fe6be3fcbc00c8e505703677468e"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"ceeeac96719e0484e5edabb588770883f855e0f2","unresolved":false,"context_lines":[{"line_number":949,"context_line":"----------"},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"* Modify REST API controller for resource providers to return JSON response"},{"line_number":952,"context_line":"* openstackclient update"},{"line_number":953,"context_line":"* Documentation update"},{"line_number":954,"context_line":""},{"line_number":955,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3a1ff146_39dcfee3","line":952,"updated":"2017-03-16 11:05:19.000000000","message":"There\u0027s not yet support for placement in OSC, but there are plans to make a plugin.","commit_id":"4e50dcbe4c89fe6be3fcbc00c8e505703677468e"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"d9b1699e5ff6a6b175ec5adecf90e2ea8f11ac02","unresolved":false,"context_lines":[{"line_number":949,"context_line":"----------"},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"* Modify REST API controller for resource providers to return JSON response"},{"line_number":952,"context_line":"* openstackclient update"},{"line_number":953,"context_line":"* Documentation update"},{"line_number":954,"context_line":""},{"line_number":955,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1a1ced50_0a09e92c","line":952,"in_reply_to":"3a1ff146_39dcfee3","updated":"2017-03-17 08:29:11.000000000","message":"Should I make it conditional? Or should I remove it from work items?","commit_id":"4e50dcbe4c89fe6be3fcbc00c8e505703677468e"}],"specs/queens/approved/placement-api-error-handling.rst":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"54611ec5b3eede0fed856a91327fc60fd9068c22","unresolved":false,"context_lines":[{"line_number":109,"context_line":"made, it is distinguished from other ``409`` responses by a code of"},{"line_number":110,"context_line":"``placement.rp_name_exists``."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"``help`` is a link to the relevant section of the Placement API reference."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"Both the help link and the code string are unique to the handler methods in"},{"line_number":115,"context_line":"the placement API code that raises the exception. Once a code is chosen for"}],"source_content_type":"text/x-rst","patch_set":8,"id":"3f1d235d_b03968a4","line":112,"updated":"2017-07-10 23:27:58.000000000","message":"Is the help link required?\n\nIf so, developers of the placement API may complain that a) that\u0027s a pretty heavyweight requirement; b) not all errors are relatable to a particular section of the reference doc (that is, only \"user errors\" would conceivably have a valid non-generic help link).\n\nIf not (or if it defaults to the Placement API ref home page) it may be subject to abusive omission.\n\nIn either case, it may be worth mentioning that ongoing addition of error codes/conditions in the placement API should be accompanied by corresponding updates to the docs as necessary/appropriate - within the same change set, since the docs now reside within the same project (right?).","commit_id":"44115ce8fadfaa58fe0c50a22e3c1295c27e30fb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"73e271949be8c7cab92467589b99a542a31ed836","unresolved":false,"context_lines":[{"line_number":109,"context_line":"made, it is distinguished from other ``409`` responses by a code of"},{"line_number":110,"context_line":"``placement.rp_name_exists``."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"``help`` is a link to the relevant section of the Placement API reference."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"Both the help link and the code string are unique to the handler methods in"},{"line_number":115,"context_line":"the placement API code that raises the exception. Once a code is chosen for"}],"source_content_type":"text/x-rst","patch_set":8,"id":"3f1d235d_864f3a33","line":112,"in_reply_to":"3f1d235d_3d6f61c6","updated":"2017-07-11 16:28:15.000000000","message":"If the doc has a section with the error IDs and explanations thereof, then I reckon we don\u0027t need the `help` deal in the code at all; it could be autogenerated as a search URL with that ID in it.  But then there should be some way (more reliable than hoping reviewers remember to look for it) to make sure all error IDs are represented in the doc.  Maybe a hacking rule?\n\nProviding a link to the specific METHOD:/url pair could also probably be automated, though it is perhaps of little value.","commit_id":"44115ce8fadfaa58fe0c50a22e3c1295c27e30fb"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"bb4c2c500b316d001e8ac9ddfc6fb973a5f1c514","unresolved":false,"context_lines":[{"line_number":109,"context_line":"made, it is distinguished from other ``409`` responses by a code of"},{"line_number":110,"context_line":"``placement.rp_name_exists``."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"``help`` is a link to the relevant section of the Placement API reference."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"Both the help link and the code string are unique to the handler methods in"},{"line_number":115,"context_line":"the placement API code that raises the exception. Once a code is chosen for"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ff346bd7_2ecf2eb1","line":112,"in_reply_to":"3f1d235d_864f3a33","updated":"2017-07-25 16:17:06.000000000","message":"According to API-WG guidelines[1], \u0027links\u0027 sections should contain at least one item with \u0027rel\u0027 set to \u0027help\u0027 and \u0027href\u0027 pointing to the documentation. I didn\u0027t place any concrete links to the url, since documentation wasn\u0027t there during preparing this BP.\n\nIMO reference id of an error would be enough for identifying the root cause of an error, but since I\u0027d been advised to follow API-WG guideline, here it is.\n\n[1] https://specs.openstack.org/openstack/api-wg/guidelines/errors.html","commit_id":"44115ce8fadfaa58fe0c50a22e3c1295c27e30fb"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"59c1d611076e8aef93d29552e1e7348ae116b8ae","unresolved":false,"context_lines":[{"line_number":109,"context_line":"made, it is distinguished from other ``409`` responses by a code of"},{"line_number":110,"context_line":"``placement.rp_name_exists``."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"``help`` is a link to the relevant section of the Placement API reference."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"Both the help link and the code string are unique to the handler methods in"},{"line_number":115,"context_line":"the placement API code that raises the exception. Once a code is chosen for"}],"source_content_type":"text/x-rst","patch_set":8,"id":"3f1d235d_3d6f61c6","line":112,"in_reply_to":"3f1d235d_b03968a4","updated":"2017-07-11 10:40:08.000000000","message":"Good questions, thanks. I\u0027m not sure if I have complete answers (in part because I\u0027ve simply copied the inclusion of the help from the previous version which I didn\u0027t write, in part because I think help links aren\u0027t great if on private networks, in part because if we have unique codes they are fairly searchable, so links are superfluous and what\u0027s the UI for that anyway) but I can at least provide some context:\n\nI\u0027m not sure if we should make it required or not, but because of the way placement\u0027s web framework works and the way the documentation is formatted, it could be relatively straightforward for most cases:\n\n* There is a one to one relationship between a METHOD:/url pair and a function in the placement code.\n* Most exceptions that are raised happen in those functions and thus the conceptual understanding of functionality, errors, links in the help are if not straightforward at least fairly discoverable.\n\nThe docs are in the same project; currently they include very limited information about error situations. I would hope that this kind of thing would help improve that situation.","commit_id":"44115ce8fadfaa58fe0c50a22e3c1295c27e30fb"}],"specs/rocky/approved/placement-api-error-handling.rst":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"dc5c0f702db5fb0840227f947ab17f9c80e46950","unresolved":false,"context_lines":[{"line_number":126,"context_line":"prefix of ``placement.``. For instance, when creating a new resource provider,"},{"line_number":127,"context_line":"if the name of the resource provider already exists and a ``409`` response is"},{"line_number":128,"context_line":"made, it is distinguished from other ``409`` responses by a code of"},{"line_number":129,"context_line":"``placement.rp_name_exists``."},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"The ``code`` string is unique to the handler methods in the placement API code"},{"line_number":132,"context_line":"that raises the exception. Once a code is chosen for a specific error situation"}],"source_content_type":"text/x-rst","patch_set":9,"id":"3fa0c359_4fdb41ec","line":129,"range":{"start_line":129,"start_character":2,"end_line":129,"end_character":26},"updated":"2018-02-20 17:34:55.000000000","message":"If the point of this is to make it more consumable for users, let\u0027s not use internal nicknames like \u0027rp\u0027.","commit_id":"a052bea0ff6fe293bca0e31786d83ccfcd31afc7"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"52c3c42414acf7ef7524f2103496792a7b87b45b","unresolved":false,"context_lines":[{"line_number":126,"context_line":"prefix of ``placement.``. For instance, when creating a new resource provider,"},{"line_number":127,"context_line":"if the name of the resource provider already exists and a ``409`` response is"},{"line_number":128,"context_line":"made, it is distinguished from other ``409`` responses by a code of"},{"line_number":129,"context_line":"``placement.rp_name_exists``."},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"The ``code`` string is unique to the handler methods in the placement API code"},{"line_number":132,"context_line":"that raises the exception. Once a code is chosen for a specific error situation"}],"source_content_type":"text/x-rst","patch_set":9,"id":"3fa0c359_af3c45e1","line":129,"range":{"start_line":129,"start_character":2,"end_line":129,"end_character":26},"in_reply_to":"3fa0c359_4fdb41ec","updated":"2018-02-20 17:41:01.000000000","message":"Yeah, agree, that\u0027s just a placeholder.","commit_id":"a052bea0ff6fe293bca0e31786d83ccfcd31afc7"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"22a2946e208ccc20fda934615b81a0a87cf364ce","unresolved":false,"context_lines":[{"line_number":27,"context_line":"Use Cases"},{"line_number":28,"context_line":"---------"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"As a consumer of placement API, I want to be able to clearly distinguish the"},{"line_number":31,"context_line":"different reaons for failed requests, especially in the case where there are"},{"line_number":32,"context_line":"different causes for the same HTTP status code, so that I can react on each"},{"line_number":33,"context_line":"case accordingly."}],"source_content_type":"text/x-rst","patch_set":10,"id":"3fa0c359_32989873","line":30,"updated":"2018-02-20 18:40:21.000000000","message":"the","commit_id":"0b3007e157266ab56b4575f3f9b6aaba25797585"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"22a2946e208ccc20fda934615b81a0a87cf364ce","unresolved":false,"context_lines":[{"line_number":54,"context_line":"* Making all the changes at once will require a lot of churn in the code for"},{"line_number":55,"context_line":"  limited immediate value."},{"line_number":56,"context_line":"* Delaying implementation while we determine a complete ontology for placement"},{"line_number":57,"context_line":"  error responses may delay us until the heat death of the universe."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"Alternatives"},{"line_number":60,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3fa0c359_92fc0c73","line":57,"range":{"start_line":57,"start_character":41,"end_line":57,"end_character":67},"updated":"2018-02-20 18:40:21.000000000","message":"++","commit_id":"0b3007e157266ab56b4575f3f9b6aaba25797585"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"22a2946e208ccc20fda934615b81a0a87cf364ce","unresolved":false,"context_lines":[{"line_number":77,"context_line":"the same time code could just check for the `code` key in the response."},{"line_number":78,"context_line":"Another option could be to microversion as needed. For example, the case of"},{"line_number":79,"context_line":"inventory violation conflicts (versus generation conflicts), might be a good"},{"line_number":80,"context_line":"choice."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"Data model impact"},{"line_number":83,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3fa0c359_b26ee8fd","line":80,"updated":"2018-02-20 18:40:21.000000000","message":"This is a tough one.\n\nMicroversioning will lead to an explosion of microversions, in proportion to the granularity with which we propose patches to add error codes, which we\u0027ve said we want to be high.  That\u0027s ick.\n\nBut on the other hand, if we don\u0027t microversion the changes, the caller will *always* have to check the text if `code` is absent.  Unless we make a rule that a *whole* API must be error-coded at once, or otherwise enforce that `code` is present-even-if-empty once the transition has been made for that API.  Which may be tough to enforce.\n\n[Later] A suggested way forward:\n\n- Define a catch-all code representing \"this error path hasn\u0027t been assigned a specific code yet\".\n- Cut over an entire API (method+URI) in a single patch, ensuring that all error conditions yield the \"unspecified\" error code.  This cutover can get a new microversion or not - doesn\u0027t matter.  Callers can tell whether the API was error code-enabled based on the presence of the `code` field, as you suggest.\n- Assign specific codes to specific error conditions as incrementally as we like, over as many patches as we like, over whatever timeline we like, without microversioning those changes.","commit_id":"0b3007e157266ab56b4575f3f9b6aaba25797585"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"20ba71d20ffb6404914c66a8e4a4b8f041c1e970","unresolved":false,"context_lines":[{"line_number":77,"context_line":"the same time code could just check for the `code` key in the response."},{"line_number":78,"context_line":"Another option could be to microversion as needed. For example, the case of"},{"line_number":79,"context_line":"inventory violation conflicts (versus generation conflicts), might be a good"},{"line_number":80,"context_line":"choice."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"Data model impact"},{"line_number":83,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3fa0c359_b5ac929f","line":80,"in_reply_to":"3fa0c359_b26ee8fd","updated":"2018-02-20 18:46:46.000000000","message":"...and as we move into the future:\n\n- When we think we\u0027ve got most of the error paths specified, add a warning any time we return an error with the `unspecified` code.\n- When we\u0027re sure we\u0027ve got all the error paths specified, make a switch allowing that condition to be fatal, and switch it on in test, to enforce that new error conditions get specific codes.","commit_id":"0b3007e157266ab56b4575f3f9b6aaba25797585"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"d72e85b8b567ab0308e830036a0e18b73e60ab7f","unresolved":false,"context_lines":[{"line_number":77,"context_line":"the same time code could just check for the `code` key in the response."},{"line_number":78,"context_line":"Another option could be to microversion as needed. For example, the case of"},{"line_number":79,"context_line":"inventory violation conflicts (versus generation conflicts), might be a good"},{"line_number":80,"context_line":"choice."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"Data model impact"},{"line_number":83,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3fa0c359_7bed86ee","line":80,"in_reply_to":"3fa0c359_b5ac929f","updated":"2018-02-21 14:59:12.000000000","message":"I think what is being proposed is a single microversion bump to signal \"From this point forward, error responses will contain error codes\". We don\u0027t need a bump for every new or modified code.","commit_id":"0b3007e157266ab56b4575f3f9b6aaba25797585"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"d72e85b8b567ab0308e830036a0e18b73e60ab7f","unresolved":false,"context_lines":[{"line_number":129,"context_line":"``placement.resource_provider.name_exists``."},{"line_number":130,"context_line":""},{"line_number":131,"context_line":".. note:: It is not the purpose of this specification to come up with a naming"},{"line_number":132,"context_line":"          scheme for error codes. The above is an example only."},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"The ``code`` string is unique to the handler methods in the placement API code"},{"line_number":135,"context_line":"that raises the exception. Once a code is chosen for a specific error situation"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3fa0c359_5bc20a5b","line":132,"updated":"2018-02-21 14:59:12.000000000","message":"cool","commit_id":"0b3007e157266ab56b4575f3f9b6aaba25797585"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"22a2946e208ccc20fda934615b81a0a87cf364ce","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"* Determine best method for providing the information to"},{"line_number":188,"context_line":"  ``json_error_formatter``."},{"line_number":189,"context_line":"* Update at least one handler to provide ``code`` for each exception it"},{"line_number":190,"context_line":"  explicitly raises."},{"line_number":191,"context_line":"* Update gabbi tests accordingly."},{"line_number":192,"context_line":"* Document the added codes in the `placement api-ref`_."}],"source_content_type":"text/x-rst","patch_set":10,"id":"3fa0c359_75392ad5","line":189,"range":{"start_line":189,"start_character":54,"end_line":189,"end_character":58},"updated":"2018-02-20 18:40:21.000000000","message":"or maybe just one, depending how the above shakes out.","commit_id":"0b3007e157266ab56b4575f3f9b6aaba25797585"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"20ba71d20ffb6404914c66a8e4a4b8f041c1e970","unresolved":false,"context_lines":[{"line_number":190,"context_line":"  explicitly raises."},{"line_number":191,"context_line":"* Update gabbi tests accordingly."},{"line_number":192,"context_line":"* Document the added codes in the `placement api-ref`_."},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"Dependencies"},{"line_number":195,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":196,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"3fa0c359_15ff86ab","line":193,"updated":"2018-02-20 18:46:46.000000000","message":"Also a note at [1] reminding developers to ensure any new error conditions get new codes.\n\n[1] https://docs.openstack.org/nova/latest/contributor/placement.html#microversions","commit_id":"0b3007e157266ab56b4575f3f9b6aaba25797585"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"20ba71d20ffb6404914c66a8e4a4b8f041c1e970","unresolved":false,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":"The `placement api-ref`_ will be updated to reflect the addition of codes on"},{"line_number":208,"context_line":"those error responses that are changed."},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"References"},{"line_number":211,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":212,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"3fa0c359_9524f661","line":209,"updated":"2018-02-20 18:46:46.000000000","message":"see above","commit_id":"0b3007e157266ab56b4575f3f9b6aaba25797585"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2a19d6836a86e087c6839942248b642a16558711","unresolved":false,"context_lines":[{"line_number":38,"context_line":"We propose to extend existing HTTP error responses with a ``code`` field as"},{"line_number":39,"context_line":"described in the API-WG Errors_ specification. This will help consumers of the"},{"line_number":40,"context_line":"API to easily recognize the type of the error cases. Note that the new format"},{"line_number":41,"context_line":"of the response is for ``application/json`` only."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"The exact implementation for doing this requires some experimentation. Webob\u0027s"},{"line_number":44,"context_line":"error formatting makes it quite challenging to get at the desired information"}],"source_content_type":"text/x-rst","patch_set":11,"id":"df7087c5_0834fcfa","line":41,"range":{"start_line":41,"start_character":23,"end_line":41,"end_character":49},"updated":"2018-03-15 14:30:40.000000000","message":"side note: Do we support other formats?","commit_id":"e48e836b0cfb657579db33ab34fb73ae96aecbf9"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"83e6b7b411956e67a4ad8e7d791a50c77d307075","unresolved":false,"context_lines":[{"line_number":38,"context_line":"We propose to extend existing HTTP error responses with a ``code`` field as"},{"line_number":39,"context_line":"described in the API-WG Errors_ specification. This will help consumers of the"},{"line_number":40,"context_line":"API to easily recognize the type of the error cases. Note that the new format"},{"line_number":41,"context_line":"of the response is for ``application/json`` only."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"The exact implementation for doing this requires some experimentation. Webob\u0027s"},{"line_number":44,"context_line":"error formatting makes it quite challenging to get at the desired information"}],"source_content_type":"text/x-rst","patch_set":11,"id":"df7087c5_4be50e37","line":41,"range":{"start_line":41,"start_character":23,"end_line":41,"end_character":49},"in_reply_to":"df7087c5_0834fcfa","updated":"2018-03-15 14:33:54.000000000","message":"Yeah, in placement it is possible for error responses to be in HTML to plain text if you make a request with accept header for text/plain or text/html and somehow cause an error. This is not something you\u0027d see in day to day activity, but it can happen.","commit_id":"e48e836b0cfb657579db33ab34fb73ae96aecbf9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2a19d6836a86e087c6839942248b642a16558711","unresolved":false,"context_lines":[{"line_number":43,"context_line":"The exact implementation for doing this requires some experimentation. Webob\u0027s"},{"line_number":44,"context_line":"error formatting makes it quite challenging to get at the desired information"},{"line_number":45,"context_line":"(the formatter does not have clean access to the exception object). The most"},{"line_number":46,"context_line":"straightforward thing to do is to inject the WSGI `environ` with the required"},{"line_number":47,"context_line":"information when creating an exception. Doing this elegantly is where the"},{"line_number":48,"context_line":"experimentation comes in. There is a `work in progress`_ spike."},{"line_number":49,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"df7087c5_a80b9027","line":46,"range":{"start_line":46,"start_character":50,"end_line":46,"end_character":59},"updated":"2018-03-15 14:30:40.000000000","message":"``environ``","commit_id":"e48e836b0cfb657579db33ab34fb73ae96aecbf9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2a19d6836a86e087c6839942248b642a16558711","unresolved":false,"context_lines":[{"line_number":54,"context_line":"* Making all the changes at once will require a lot of churn in the code for"},{"line_number":55,"context_line":"  limited immediate value."},{"line_number":56,"context_line":"* Delaying implementation while we determine a complete ontology for placement"},{"line_number":57,"context_line":"  error responses may delay us until the heat death of the universe."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"For those errors where a specific code is not yet required, a generic code will"},{"line_number":60,"context_line":"be present. A new microversion will be created. Before that microversion, no"}],"source_content_type":"text/x-rst","patch_set":11,"id":"df7087c5_8b3ec6be","line":57,"range":{"start_line":57,"start_character":28,"end_line":57,"end_character":68},"updated":"2018-03-15 14:30:40.000000000","message":"heh","commit_id":"e48e836b0cfb657579db33ab34fb73ae96aecbf9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"943bf6bc083ee98cb5f6098c498197a3eee9ebc5","unresolved":false,"context_lines":[{"line_number":57,"context_line":"* Making all the changes at once will require a lot of churn in the code for"},{"line_number":58,"context_line":"  limited immediate value."},{"line_number":59,"context_line":"* Delaying implementation while we determine a complete ontology for placement"},{"line_number":60,"context_line":"  error responses may delay us until the heat death of the universe."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"For those errors where a specific code is not yet required, a generic code will"},{"line_number":63,"context_line":"be present. A new microversion will be created. Before that microversion, no"}],"source_content_type":"text/x-rst","patch_set":12,"id":"bf659307_db054e47","line":60,"updated":"2018-04-04 10:45:38.000000000","message":"/me nods","commit_id":"75b7b2969705da4d5ccb72508910065f3ea372e2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"943bf6bc083ee98cb5f6098c498197a3eee9ebc5","unresolved":false,"context_lines":[{"line_number":62,"context_line":"For those errors where a specific code is not yet required, a generic code will"},{"line_number":63,"context_line":"be present. A new microversion will be created. Before that microversion, no"},{"line_number":64,"context_line":"code is present. After that microversion a code will always be present but it"},{"line_number":65,"context_line":"will not always be specific to any given error."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"Alternatives"},{"line_number":68,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":12,"id":"bf659307_3b6ecaff","line":65,"updated":"2018-04-04 10:45:38.000000000","message":"I am +1 that approach, in general. As a user I can know if I can rely on the code being present by checking the available microversions. The details we can argue case by case, as you mention.","commit_id":"75b7b2969705da4d5ccb72508910065f3ea372e2"}]}
