Skip to content

Commit

Permalink
Catch HTTP send errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mbtools committed Apr 12, 2021
1 parent 74f64c2 commit a65b30d
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/http/#mbtools#cl_http_client.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,22 @@ CLASS /mbtools/cl_http_client IMPLEMENTATION.
lv_code TYPE i,
lv_message TYPE string.

mi_client->send( ).
mi_client->receive(
mi_client->send(
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
OTHERS = 4 ).
http_invalid_timeout = 4
OTHERS = 5 ).

IF sy-subrc = 0.
mi_client->receive(
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
OTHERS = 4 ).
ENDIF.

IF sy-subrc <> 0.
" in case of HTTP_COMMUNICATION_FAILURE
Expand Down

0 comments on commit a65b30d

Please sign in to comment.