chore: added apiStandard exception#756
chore: added apiStandard exception#756sbansla wants to merge 1 commit intomultiple_response_in_a_resource_csharpfrom
Conversation
| } | ||
| catch (JsonException e) { | ||
| throw new ApiException(e.Message, e); | ||
| throw new ApiStandardException(e.Message, e); |
There was a problem hiding this comment.
Are we going the route of creating only 1 exception class and merging the exception fields?
There was a problem hiding this comment.
no, I created different exception, creating one exception would create confusion to the user.
There was a problem hiding this comment.
Shouldn't here be then #isApiV1 ?
There was a problem hiding this comment.
got it, but this exception should also be part of normal files, right?
There was a problem hiding this comment.
ReadResponse.mustache is only applicable to v1.0 api standards.
Lets take an example of Message API, So Currently response is kept under Message class. But for v1.x apis, I am creating different classes for each operation, example: MessageReadResponse, MessageFetchResponse etc.
ReadResponse.mustache is used in generating MessageReadResponse.
Thats is why only ApiStandardException exists in here.
PR in twilio-csharp repo: twilio/twilio-csharp#814
| } | ||
| catch (JsonException e) { | ||
| throw new ApiException(e.Message, e); | ||
| throw new ApiStandardException(e.Message, e); |
There was a problem hiding this comment.
got it, but this exception should also be part of normal files, right?
Added Exception to twilio-csharp generated code using apiStandard flag.