Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

Closed Unassigned: make fetch_token more resilient to errors [172]

$
0
0
Example from src\http\oauth\oauth2_handler.cpp:

```
.then([](json::value token_json)
{
return token_json[U("access_token")].as_string();
})
```

If we don’t get the expected value, it will resurface as an unhandled JSON parsing error, which is very hard to diagnose. Maybe there is a non-exceptional way to deal with it?
Comments: Looks fine based on the code. I do want to avoid excessive exception throwing in this code, and this is already covered by issue #183.

Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>