Skip to content

Commit

Permalink
add help message for http error 400
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidVorick committed Oct 22, 2015
1 parent 4ef5698 commit 19b7da4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion network.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ CURL *curl;
int check_http_response(CURL *curl) {
long http_code = 0;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code);
if (http_code != 200) {
if (http_code == 400) {
fprintf(stderr, "HTTP error %lu - check that the wallet is unlocked\n", http_code);
return 1;
} else if (http_code != 200) {
fprintf(stderr, "HTTP error %lu\n", http_code);
return 1;
}
Expand Down

0 comments on commit 19b7da4

Please sign in to comment.