Handle sso token exchange errors in zerotier client

This commit is contained in:
Grant Limberg 2022-05-11 19:59:58 -07:00
parent aee9521c91
commit 4151749dc9
No known key found for this signature in database
GPG key ID: 8F2F97D3BE8D7735
2 changed files with 19 additions and 4 deletions

View file

@ -275,7 +275,7 @@ pub extern "C" fn zeroidc_token_exchange(idc: *mut ZeroIDC, code: *const c_char
},
Err(e) => {
let errstr = format!("{{\"message\":\"{}\"\"}}", e).to_string();
let errstr = format!("{{\"errorMessage\":\"{}\"\"}}", e).to_string();
let ret = CString::new(errstr).unwrap();
return ret.into_raw();
}