cancel
Showing results for 
Search instead for 
Did you mean: 

External REST-Service Statuscode 9xx Response causes exception - Can I add additional to ICM?

Florian
Active Contributor

Hi everyone,

I have an external REST-Service which give me in some cases a non-standard response code, which leads to an exception in my rest-development.

The root-cause of this error is, that the ICM-Server does not know this statuscode. I can also see the error in transaction SMICM when I have a look at the log. There is my Statuscode correct displayed, but this does not help me, because it's not transported to my application.

So I ask myself, if there is a way to add this statuscodes (for example 950) to the icm, that it does not end with a dump.

Before you suggest it, it is not possible to modify the REST-Service on the other side, because it's a mainly used service and I'm not allowed to request changes.

~Florian

Florian
Active Contributor
0 Kudos

andre.fischer maybe you have an answer or even the answer that something like that is not possible.

Accepted Solutions (1)

Accepted Solutions (1)

Domi
Contributor

Unfortunately, the error is triggered in the kernel and only limited information is transferred to the application code.

Client method receive( ): raises EXCEPTIONS http_communication_failure

Client method response->get_header_fields( ): only these header fields are available, no additional/custom header fields!

  • ~response_line HTTP/1.0 500 Connection Broken
  • ~server_protocol HTTP/1.0
  • ~status_code 500
  • ~status_reason Connection Broken
  • date Tue, 17 Nov 2020 22:03:42 GMT
  • server SAP NetWeaver Application Server 7.42 / ICM 7.42
  • connection close
  • content-length 1234
  • content-type text/html
  • ~remote_addr
  • ~uri_scheme_expanded NONE

Client method response->get_last_error( ) returns:

  • code 401
  • message connection to partner broken
  • message_class SCLNT_HTTP
  • message_number 401

Remote Service Status Code:

  • 001 - 099: Status Code 500 - NO Exception
  • 100: Status Code 500 - Exception
  • 101: Status Code 400 - Exception
  • 102: Status Code 500 - Exception
  • >600: Status Code 500 - Exception

Answers (2)

Answers (2)

AchimB
Employee
Employee

The HTTP specification states the possible status codes in Section 6 of RFC 7231: "There are five values for the first digit" and then lists the values 1..5. Status codes starting with 9 therefore violate the HTTP standard and are not accepted by the ICM.

Since you exclude changing the behavior of the service the only thing that comes to my mind is using a reverse proxy that rewrites the status code. You cannot use SAP Web Dispatcher here, because it applies the same criteria for valid responses.

Achim Braemer
(ICM product owner)

Florian
Active Contributor
0 Kudos

Thank you for the detailed answer. That helps a lot to go into further discussions with the provider.

~Florian

gregorw
Active Contributor

The German Wikipedia describes this status codes as 9xx – Proprietäre Fehler. I would think it's an error in SAP's implementation and that should be fixed.