add specific error message for 426 http error (#6901)

Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com>
This commit is contained in:
Christian Günter 2024-04-05 13:36:12 +02:00 committed by GitHub
parent 412cd9995b
commit 6980aae774
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 }| ).