11## Exceptions
2-
32When you make a request via the SDK, there is a chance of request failing
43due to various reasons. When such a failure happens, an exception
5- corresponding to the error occurred is raised .
4+ corresponding to the error occurred is thrown .
65
76
87----
98#### Possible Exceptions
10-
119* ` BadRequestException ` If the request returns with status code ` 400 `
1210* ` UnauthorizedException ` If the request returns with status code ` 401 `
1311* ` ForbiddenException ` If the request returns with status code ` 403 `
@@ -17,7 +15,7 @@ corresponding to the error occurred is raised.
1715* ` PleaseContactBunqException ` If the request returns with status code ` 500 ` .
1816If you get this exception, please contact us preferably via the support chat in the bunq app.
1917* ` UnknownApiErrorException ` If none of the above mentioned exceptions are raised,
20- this exception will be raised instead.
18+ this exception will be thrown instead.
2119
2220For more information regarding these errors, please take a look on the documentation
2321page here: https://doc.bunq.com/api/1/page/errors
@@ -43,13 +41,13 @@ All the exceptions have the same base exception which looks like this:
4341 }
4442 }
4543```
46- This means that each exception will have the response code and the error message
47- related to the specific exception that has been raised .
44+ This means that each exception will have a response code and an error message
45+ related to the specific exception that has been thrown .
4846
4947---
5048#### Exception handling
51- Because we raise different exceptions for each error, you can catch an error
52- if you expect it to be raised .
49+ Since each API error has a distinct SDK exception type corresponding to it,
50+ you can catch the exact exceptions you expect 👏 .
5351
5452``` c#
5553using Bunq .Sdk .Context ;
@@ -73,6 +71,4 @@ public class BadRequest
7371 }
7472 }
7573}
76- ```
77-
78- This will ensure that you are ready for anything that might go wrong !
74+ ```
0 commit comments