)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":38059,"name":"Anoop Kumar Shukla","display_name":"Anoop Shukla","email":"anoop.shukla@netapp.com","username":"anoop2","status":"NetApp"},"change_message_id":"1c532ab1ef517d7d34da099ce8f010885d2e0271","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"NetApp driver: raise clear error on auth failure (HTTP 401)"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When the ONTAP API returns HTTP 401 (e.g. because the password"},{"line_number":10,"context_line":"contains special characters that are not properly escaped), the"},{"line_number":11,"context_line":"ZAPI client was attempting to parse the non-XML error response"},{"line_number":12,"context_line":"as XML, resulting in a confusing XMLSyntaxError that offered no"},{"line_number":13,"context_line":"useful guidance to the administrator."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"28e53d80_8ca5ac89","line":10,"range":{"start_line":9,"start_character":0,"end_line":10,"end_character":59},"updated":"2026-03-31 17:28:04.000000000","message":"Since we have found this limitation, can we document it as part of the password configuration that the passwords with special characters should be escaped using a leading \u0027\\\u0027? eg. pa\\$\\$w0rd","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"},{"author":{"_account_id":38940,"name":"Oluwasola Akintewe","display_name":"nathan_akin","email":"solaakintewe@gmail.com","username":"nathan_akin"},"change_message_id":"c5854dc402aca64082512f4cc4a491d1787f1f65","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"NetApp driver: raise clear error on auth failure (HTTP 401)"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When the ONTAP API returns HTTP 401 (e.g. because the password"},{"line_number":10,"context_line":"contains special characters that are not properly escaped), the"},{"line_number":11,"context_line":"ZAPI client was attempting to parse the non-XML error response"},{"line_number":12,"context_line":"as XML, resulting in a confusing XMLSyntaxError that offered no"},{"line_number":13,"context_line":"useful guidance to the administrator."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb7571c_1796609c","line":10,"range":{"start_line":9,"start_character":0,"end_line":10,"end_character":59},"in_reply_to":"28e53d80_8ca5ac89","updated":"2026-03-31 21:48:06.000000000","message":"Thanks for the suggestion. The primary goal of this patch is to surface a clear error when auth fails rather than a confusing XMLSyntaxError. Documenting password escaping would be a separate improvement and could go in the configuration reference docs, but i feel it\u0027s a bit out of scope for this fix. I am happy to update if the team feels otherwise.","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"},{"author":{"_account_id":38940,"name":"Oluwasola Akintewe","display_name":"nathan_akin","email":"solaakintewe@gmail.com","username":"nathan_akin"},"change_message_id":"0910d06a562ffc1a9c4dd949216cf4fefb2cb573","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"NetApp driver: raise clear error on auth failure (HTTP 401)"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When the ONTAP API returns HTTP 401 (e.g. because the password"},{"line_number":10,"context_line":"contains special characters that are not properly escaped), the"},{"line_number":11,"context_line":"ZAPI client was attempting to parse the non-XML error response"},{"line_number":12,"context_line":"as XML, resulting in a confusing XMLSyntaxError that offered no"},{"line_number":13,"context_line":"useful guidance to the administrator."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ef0adec5_4a84b5a4","line":10,"range":{"start_line":9,"start_character":0,"end_line":10,"end_character":59},"in_reply_to":"9fb7571c_1796609c","updated":"2026-03-31 22:05:03.000000000","message":"Done","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"1279535e27e8c4c6c0715281038343c43ebd3bb9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"59832161_ffdd76f6","updated":"2026-03-31 15:13:17.000000000","message":"I find the solution with the status code quite elegant.\n\nJust FYI, I started investigating something similar for 500 Internal Server error and went down the rabbit hole in parsing the html (see inline)","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"},{"author":{"_account_id":38059,"name":"Anoop Kumar Shukla","display_name":"Anoop Shukla","email":"anoop.shukla@netapp.com","username":"anoop2","status":"NetApp"},"change_message_id":"1c532ab1ef517d7d34da099ce8f010885d2e0271","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"e2a64cad_d1d6dd52","updated":"2026-03-31 17:28:04.000000000","message":"Please look at the comments.","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"},{"author":{"_account_id":38940,"name":"Oluwasola Akintewe","display_name":"nathan_akin","email":"solaakintewe@gmail.com","username":"nathan_akin"},"change_message_id":"b6997e6690a3e5c9d8b0ccdeabf46d77107f9ddb","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"bc451dfd_c7ef216d","in_reply_to":"1a889e8f_d048b69b","updated":"2026-04-01 10:48:26.000000000","message":"That\u0027s a good point , I wasn\u0027t sure about that either. The current patchset 2 does add a generic non-2xx handler, but you\u0027re right that for 500, ONTAP might return a valid XML body with more useful info. Happy to keep the non-2xx handler conservative or remove it entirely and only keep the 401 case if the team prefers. @anoop.shukla@netapp.com, would love your input here too","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"},{"author":{"_account_id":38940,"name":"Oluwasola Akintewe","display_name":"nathan_akin","email":"solaakintewe@gmail.com","username":"nathan_akin"},"change_message_id":"c5854dc402aca64082512f4cc4a491d1787f1f65","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"79d3b076_944e5b24","in_reply_to":"59832161_ffdd76f6","updated":"2026-03-31 21:48:06.000000000","message":"hello carthaca thank you for the review and the context! i was thinking the same thing the 500 case would hit the same problem. maybe i can extend the fix to handle that too, so instead of crashing with XMLSyntaxError we raise a clear error for 500 as well. would that make sense to add to this patch or should it be a separate one?","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"},{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"143e5130435e08343f89a4222398e494ee6a1243","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"1a889e8f_d048b69b","in_reply_to":"79d3b076_944e5b24","updated":"2026-04-01 08:00:31.000000000","message":"I\u0027m not sure, for 401 it is clear (I hope) that we are dealing with an auth problem.\nBut for 500 I can imagine, that there are situations where would get a status code 500, but also a valid XML (with some helpful content in the body).\nMaybe @anoop.shukla@netapp.com can chime in? I did not find documentation about the status codes for ZAPI.","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"},{"author":{"_account_id":38059,"name":"Anoop Kumar Shukla","display_name":"Anoop Shukla","email":"anoop.shukla@netapp.com","username":"anoop2","status":"NetApp"},"change_message_id":"30632a5c7f8829a0466fe6e6125d45e1716dcf10","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"4ba2864b_541dd64e","in_reply_to":"bc451dfd_c7ef216d","updated":"2026-04-24 15:21:24.000000000","message":"500 is a retryable error in general as it means that the server at the moment doesnt seem to be available to serve the request or something went wrong while serving the request. \n\nIf we will need handling of 500 errors, shouldnt they be with retry logic?","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"},{"author":{"_account_id":38059,"name":"Anoop Kumar Shukla","display_name":"Anoop Shukla","email":"anoop.shukla@netapp.com","username":"anoop2","status":"NetApp"},"change_message_id":"c6c66c33cd203a3ceb201b0f7f82ee39262a4aa7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"6ae41bba_0cf6d857","updated":"2026-04-23 05:20:17.000000000","message":"Looks good to me. Thanks for fixing this.","commit_id":"5fd395543a1ae37b7c38a397b8eaf7e347ea4a1c"},{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"57073aa3773d403b9c0f684ca997238de2c7c55f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"e097aeea_8717847b","updated":"2026-04-24 08:58:37.000000000","message":"run-NetApp CI","commit_id":"5fd395543a1ae37b7c38a397b8eaf7e347ea4a1c"}],"manila/share/drivers/netapp/dataontap/client/api.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"7ef8ce4fdab143d400c63aa07bac3c00f2f6edc1","unresolved":true,"context_lines":[{"line_number":381,"context_line":"        except Exception as e:"},{"line_number":382,"context_line":"            raise NaApiError(message\u003de)"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"        if response.status_code \u003d\u003d 401:"},{"line_number":385,"context_line":"            raise NaApiError(\u0027EAUTHENTICATION\u0027,"},{"line_number":386,"context_line":"                             \u0027Authentication failed. Verify netapp_login and \u0027"},{"line_number":387,"context_line":"                             \u0027netapp_password in the driver configuration.\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"787e8854_44d2a4d1","line":384,"updated":"2026-03-31 21:18:52.000000000","message":"Consider guarding against a broader set of non-success HTTP status\ncodes rather than only 401. A 403 or 500 from ONTAP will also\nreturn an HTML body that _parse_response will fail to parse as XML.\nIf keeping this scoped to 401 only, add a code comment explaining\nwhy.","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"},{"author":{"_account_id":38940,"name":"Oluwasola Akintewe","display_name":"nathan_akin","email":"solaakintewe@gmail.com","username":"nathan_akin"},"change_message_id":"0910d06a562ffc1a9c4dd949216cf4fefb2cb573","unresolved":false,"context_lines":[{"line_number":381,"context_line":"        except Exception as e:"},{"line_number":382,"context_line":"            raise NaApiError(message\u003de)"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"        if response.status_code \u003d\u003d 401:"},{"line_number":385,"context_line":"            raise NaApiError(\u0027EAUTHENTICATION\u0027,"},{"line_number":386,"context_line":"                             \u0027Authentication failed. Verify netapp_login and \u0027"},{"line_number":387,"context_line":"                             \u0027netapp_password in the driver configuration.\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"c38024f7_55f9045e","line":384,"in_reply_to":"787e8854_44d2a4d1","updated":"2026-03-31 22:05:03.000000000","message":"Done","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"},{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"1279535e27e8c4c6c0715281038343c43ebd3bb9","unresolved":true,"context_lines":[{"line_number":460,"context_line":"        \"\"\"Get the NaElement for the response.\"\"\""},{"line_number":461,"context_line":"        if not response:"},{"line_number":462,"context_line":"            raise NaApiError(\u0027No response received\u0027)"},{"line_number":463,"context_line":"        xml \u003d etree.XML(response)"},{"line_number":464,"context_line":"        return NaElement(xml)"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"    def _get_result(self, response):"}],"source_content_type":"text/x-python","patch_set":1,"id":"f5ef5d5e_d5a6f0ab","line":463,"range":{"start_line":463,"start_character":8,"end_line":463,"end_character":33},"updated":"2026-03-31 15:13:17.000000000","message":"I had been trying to parse the HTML like\n\n```\r\ntry:\n    xml \u003d etree.XML(response)\nexcept etree.XMLSyntaxError:\n    # errors may return HTML instead of XML\n    xml \u003d etree.HTML(response)\n```\n\nbut the page is pretty generic and does not provide much additional info anyway.\nE.g. for Internal Server Error:\n\n```\n\r\u003c!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\"\u003e\n\u003chtml\u003e\u003chead\u003e\n\u003ctitle\u003e500 Internal Server Error\u003c/title\u003e\n\u003c/head\u003e\u003cbody\u003e\n\u003ch1\u003eInternal Server Error\u003c/h1\u003e\n\u003cp\u003eThe server encountered an internal error or\nmisconfiguration and was unable to complete\nyour request.\u003c/p\u003e\n\u003cp\u003ePlease contact the server administrator at \n [no address given] to inform them of the time this error occurred,\n and the actions you performed just before this error.\u003c/p\u003e\n\u003cp\u003eMore information about this error may be available\nin the server error log.\u003c/p\u003e\n\u003c/body\u003e\u003c/html\u003e\n```","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"},{"author":{"_account_id":38940,"name":"Oluwasola Akintewe","display_name":"nathan_akin","email":"solaakintewe@gmail.com","username":"nathan_akin"},"change_message_id":"c5854dc402aca64082512f4cc4a491d1787f1f65","unresolved":true,"context_lines":[{"line_number":460,"context_line":"        \"\"\"Get the NaElement for the response.\"\"\""},{"line_number":461,"context_line":"        if not response:"},{"line_number":462,"context_line":"            raise NaApiError(\u0027No response received\u0027)"},{"line_number":463,"context_line":"        xml \u003d etree.XML(response)"},{"line_number":464,"context_line":"        return NaElement(xml)"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"    def _get_result(self, response):"}],"source_content_type":"text/x-python","patch_set":1,"id":"81d95713_61c08611","line":463,"range":{"start_line":463,"start_character":8,"end_line":463,"end_character":33},"in_reply_to":"7b102651_be77de3f","updated":"2026-03-31 21:48:06.000000000","message":"Yes ,when ONTAP returns a 401, the response body is HTML not XML, which is why etree.XML() raises XMLSyntaxError. The fix in this patch checks the status code before attempting to parse, so we never hit the XML parser on a 401. The same check is applied to both ZapiClient and RestClient invoke_elem methods.","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"},{"author":{"_account_id":38059,"name":"Anoop Kumar Shukla","display_name":"Anoop Shukla","email":"anoop.shukla@netapp.com","username":"anoop2","status":"NetApp"},"change_message_id":"c6c66c33cd203a3ceb201b0f7f82ee39262a4aa7","unresolved":false,"context_lines":[{"line_number":460,"context_line":"        \"\"\"Get the NaElement for the response.\"\"\""},{"line_number":461,"context_line":"        if not response:"},{"line_number":462,"context_line":"            raise NaApiError(\u0027No response received\u0027)"},{"line_number":463,"context_line":"        xml \u003d etree.XML(response)"},{"line_number":464,"context_line":"        return NaElement(xml)"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"    def _get_result(self, response):"}],"source_content_type":"text/x-python","patch_set":1,"id":"6f461938_53521257","line":463,"range":{"start_line":463,"start_character":8,"end_line":463,"end_character":33},"in_reply_to":"81d95713_61c08611","updated":"2026-04-23 05:20:17.000000000","message":"Acknowledged","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"},{"author":{"_account_id":38059,"name":"Anoop Kumar Shukla","display_name":"Anoop Shukla","email":"anoop.shukla@netapp.com","username":"anoop2","status":"NetApp"},"change_message_id":"1c532ab1ef517d7d34da099ce8f010885d2e0271","unresolved":true,"context_lines":[{"line_number":460,"context_line":"        \"\"\"Get the NaElement for the response.\"\"\""},{"line_number":461,"context_line":"        if not response:"},{"line_number":462,"context_line":"            raise NaApiError(\u0027No response received\u0027)"},{"line_number":463,"context_line":"        xml \u003d etree.XML(response)"},{"line_number":464,"context_line":"        return NaElement(xml)"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"    def _get_result(self, response):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7b102651_be77de3f","line":463,"range":{"start_line":463,"start_character":8,"end_line":463,"end_character":33},"in_reply_to":"f5ef5d5e_d5a6f0ab","updated":"2026-03-31 17:28:04.000000000","message":"Hi Maurice. Are you saying the 401 error is not an XML but an HTML document when the error hits? Also have we tested this on the REST workflow as well?","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"7ef8ce4fdab143d400c63aa07bac3c00f2f6edc1","unresolved":true,"context_lines":[{"line_number":575,"context_line":"        except Exception as e:"},{"line_number":576,"context_line":"            raise NaApiError(message\u003de)"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":"        if response.status_code \u003d\u003d 401:"},{"line_number":579,"context_line":"            raise NaApiError(\u0027EAUTHENTICATION\u0027,"},{"line_number":580,"context_line":"                             \u0027Authentication failed. Verify netapp_login and \u0027"},{"line_number":581,"context_line":"                             \u0027netapp_password in the driver configuration.\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ec363711_3eae6787","line":578,"updated":"2026-03-31 21:18:52.000000000","message":"Same comment for the REST client path: consider a broader non-2xx\nguard or add a code comment explaining why only 401 is handled.","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"},{"author":{"_account_id":38940,"name":"Oluwasola Akintewe","display_name":"nathan_akin","email":"solaakintewe@gmail.com","username":"nathan_akin"},"change_message_id":"0910d06a562ffc1a9c4dd949216cf4fefb2cb573","unresolved":false,"context_lines":[{"line_number":575,"context_line":"        except Exception as e:"},{"line_number":576,"context_line":"            raise NaApiError(message\u003de)"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":"        if response.status_code \u003d\u003d 401:"},{"line_number":579,"context_line":"            raise NaApiError(\u0027EAUTHENTICATION\u0027,"},{"line_number":580,"context_line":"                             \u0027Authentication failed. Verify netapp_login and \u0027"},{"line_number":581,"context_line":"                             \u0027netapp_password in the driver configuration.\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"c492c682_f91fbafd","line":578,"in_reply_to":"ec363711_3eae6787","updated":"2026-03-31 22:05:03.000000000","message":"Done","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"}],"manila/tests/share/drivers/netapp/dataontap/client/test_api.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"7ef8ce4fdab143d400c63aa07bac3c00f2f6edc1","unresolved":true,"context_lines":[{"line_number":320,"context_line":""},{"line_number":321,"context_line":"        exc \u003d self.assertRaises(api.NaApiError, self.root.invoke_elem,"},{"line_number":322,"context_line":"                                na_element)"},{"line_number":323,"context_line":"        self.assertEqual(\u0027EAUTHENTICATION\u0027, exc.code)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    @ddt.data({\u0027trace_enabled\u0027: False,"},{"line_number":326,"context_line":"               \u0027trace_pattern\u0027: \u0027(.*)\u0027, \u0027log\u0027: False},"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fdd56e3_49fa7475","line":323,"updated":"2026-03-31 21:18:52.000000000","message":"The test verifies the error code but not the error message. Adding\nan assertion on exc.message would guard against accidental message\nchanges.","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"},{"author":{"_account_id":38940,"name":"Oluwasola Akintewe","display_name":"nathan_akin","email":"solaakintewe@gmail.com","username":"nathan_akin"},"change_message_id":"c07413e0799828fe52943fbef409eef910cabded","unresolved":false,"context_lines":[{"line_number":320,"context_line":""},{"line_number":321,"context_line":"        exc \u003d self.assertRaises(api.NaApiError, self.root.invoke_elem,"},{"line_number":322,"context_line":"                                na_element)"},{"line_number":323,"context_line":"        self.assertEqual(\u0027EAUTHENTICATION\u0027, exc.code)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    @ddt.data({\u0027trace_enabled\u0027: False,"},{"line_number":326,"context_line":"               \u0027trace_pattern\u0027: \u0027(.*)\u0027, \u0027log\u0027: False},"}],"source_content_type":"text/x-python","patch_set":1,"id":"ab6ca6b1_81533a46","line":323,"in_reply_to":"1fdd56e3_49fa7475","updated":"2026-03-31 22:08:11.000000000","message":"Done","commit_id":"996f79c35ce579adf00c25b0a5aeb473045a5be1"}]}
