Skip to content

Commit

Permalink
Fix missing syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidrezakp authored Feb 7, 2022
1 parent 92ee888 commit a191b10
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1157,16 +1157,17 @@ Refit traps any `ApiException` raised by the `ExceptionFactory` when processing

You can then decide what to do like so:

var response = await _myRefitClient.GetSomeStuff();
if(response.IsSuccessStatusCode)
{
//do your thing
}
else
{
_logger.LogError(response.Error, response.Error.Content);
}

```csharp
var response = await _myRefitClient.GetSomeStuff();
if(response.IsSuccessStatusCode)
{
//do your thing
}
else
{
_logger.LogError(response.Error, response.Error.Content);
}
```

#### When returning `Task<T>`
Refit throws any `ApiException` raised by the `ExceptionFactory` when processing the response and any errors that occur when attempting to deserialize the response to `Task<T>`.
Expand Down

0 comments on commit a191b10

Please sign in to comment.