1+ # ' OpenAPI Petstore
2+ # '
3+ # ' This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
4+ # '
5+ # ' The version of the OpenAPI document: 1.0.0
6+ # ' Generated by: https://openapi-generator.tech
7+ # '
8+
19# ' @docType class
210# ' @title ApiException
311# ' @description ApiException Class
@@ -14,13 +22,21 @@ ApiException <- R6::R6Class(
1422 reason = NULL ,
1523 body = NULL ,
1624 headers = NULL ,
17-
25+ # ' Initialize a new ApiException class.
26+ # '
27+ # ' @description
28+ # ' Initialize a new ApiExceptino class.
29+ # '
30+ # ' @param status HTTP status.
31+ # ' @param reason Reason of the ApiException.
32+ # ' @param http_response HTTP response object.
33+ # ' @export
1834 initialize = function (status = NULL , reason = NULL , http_response = NULL ) {
1935 if (! is.null(http_response )) {
2036 self $ status <- http_response $ status_code
2137 errorMsg <- toString(content(http_response ))
2238 if (errorMsg == " " ){
23- errorMsg <- " Api exception encountered."
39+ errorMsg <- " Api exception encountered. No details given. "
2440 }
2541 self $ body <- errorMsg
2642 self $ headers <- http_response $ headers
@@ -32,8 +48,13 @@ ApiException <- R6::R6Class(
3248 self $ headers <- NULL
3349 }
3450 },
35-
36- # returns the string format of ApiException
51+ # ' Returns the string format of ApiException.
52+ # '
53+ # ' @description
54+ # ' Returns the string format of ApiException.
55+ # '
56+ # ' @return the string format of ApiException.
57+ # ' @export
3758 toString = function () {
3859 errorMsg <- " "
3960 errorMsg <- paste(" status : " , self $ status , " \n " , sep = " " )
@@ -51,4 +72,4 @@ ApiException <- R6::R6Class(
5172 errorMsg
5273 }
5374 )
54- )
75+ )
0 commit comments