Exception
These CodeGen configurations allow you to control exceptions thrown in APIMatic generated SDKs.
Generate Exceptions
note
Please note that this setting has been deprecated. There are no plans to provide any future support or updates for it.
This setting allows generation of exception classes for Custom error types defined by the user. If you disable this setting, generic exceptions will still be thrown.
Usage
To use this feature, you need to specify a Boolean
value. By default, its value is set to true
.
"info": {
...,
"x-codegen-settings": {
"GenerateExceptions": true
}
}
Language Support
C# | Java | PHP | Python | Ruby | TS | Go |
---|---|---|---|---|---|---|
❌ | ❌ | ❌ | ✔️ | ✔️ | ❌ | ❌ |
Change in SDK
Configuring this setting has the following effect on the generated SDK:
- Python
- Ruby
Value | Change |
true (default) |
|
false |
|
Value | Change |
true (default) |
|
false |
|