ABAP-Swagger icon indicating copy to clipboard operation
ABAP-Swagger copied to clipboard

http status codes in impelementations

Open larshp opened this issue 7 years ago • 4 comments
trafficstars

somehow the method implementations should have a possibility to set the http status code?

larshp avatar Jul 01 '18 10:07 larshp

Nice idea, but as far as i understood, i could also throw an exception catched by the sicf handler and set the status there?

mAltr avatar Jul 26 '18 20:07 mAltr

not sure how that works, can you add an example? I'm sure others can use this, @JohannesKonings

larshp avatar Jul 27 '18 04:07 larshp

An example would be great. If I can set the http status code via an exception would be good for me.

JohannesKonings avatar Jul 27 '18 11:07 JohannesKonings

You could deliver an no check exception, zcx_swag_request_failure that imports code and response message. Catch it inside zcl_swag->run and manipulate mi_server->response

xinitrc86 avatar Jun 27 '19 23:06 xinitrc86