Skip to content

Commit 008414e

Browse files
author
Kevin Hellemun
committed
Changes based on review.
1 parent 8defbc0 commit 008414e

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

BunqSdk/Exception/EXCEPTIONS.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
## Exceptions
2-
32
When you make a request via the SDK, there is a chance of request failing
43
due 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`.
1816
If 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

2220
For more information regarding these errors, please take a look on the documentation
2321
page 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#
5553
using 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+
```

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,6 @@ Information regarding the test cases can be found in the [README.md](./BunqSdk.T
178178
located in [test](./BunqSdk.Tests).
179179

180180
## Exceptions
181-
The SDK can raise multiple exceptions. For an overview of these exceptions please
181+
The SDK can throw multiple exceptions. For an overview of these exceptions please
182182
take a look at [EXCEPTIONS.md](./BunqSdk/Exception/EXCEPTIONS.md)
183183

0 commit comments

Comments
 (0)