From 6980aae7748696d23be48c5b9b0a0e2b613ad0c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=BCnter?= Date: Fri, 5 Apr 2024 13:36:12 +0200 Subject: [PATCH] add specific error message for 426 http error (#6901) Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com> --- src/http/zcl_abapgit_http_client.clas.abap | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/http/zcl_abapgit_http_client.clas.abap b/src/http/zcl_abapgit_http_client.clas.abap index 6d3359b76..6e13b0aec 100644 --- a/src/http/zcl_abapgit_http_client.clas.abap +++ b/src/http/zcl_abapgit_http_client.clas.abap @@ -71,6 +71,12 @@ CLASS zcl_abapgit_http_client IMPLEMENTATION. zcx_abapgit_exception=>raise( 'Unsupported media type (HTTP 415)' ). WHEN 422. zcx_abapgit_exception=>raise( 'Unprocessable entity (HTTP 422). Check, if URL has to end with ".git"' ). + WHEN 426. + zcx_abapgit_exception=>raise( + iv_text = 'Upgrade Required (HTTP 426)' + iv_longtext = |The git server requires a different HTTP-protocol than which is sent. | + && |abapGit uses HTTP/1.1 as default. | + && |See more details in the abapGit online documentation.| ). WHEN OTHERS. lv_text = mi_client->response->get_cdata( ). zcx_abapgit_exception=>raise( |(HTTP { lv_code }) { lv_text }| ).