mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 19:55:10 +00:00
[FIX/WIP] Log out error info on ASSend
This commit is contained in:
parent
3bef6afa5d
commit
43175e32e5
1 changed files with 13 additions and 1 deletions
|
|
@ -33,6 +33,11 @@ ASSend(const ParseeConfig *conf, char *id, char *user, char *type, HashMap *c, u
|
|||
char *path;
|
||||
char *txn, *ret;
|
||||
char *ts_str;
|
||||
HttpStatus status;
|
||||
if (!ret)
|
||||
{
|
||||
Log(LOG_ERR, "%", ret);
|
||||
}
|
||||
HashMap *reply;
|
||||
if (!conf || !id || !type || !user || !c)
|
||||
{
|
||||
|
|
@ -60,10 +65,17 @@ ASSend(const ParseeConfig *conf, char *id, char *user, char *type, HashMap *c, u
|
|||
ctx = ParseeCreateRequest(conf, HTTP_PUT, path);
|
||||
Free(path);
|
||||
ASAuthenticateRequest(conf, ctx);
|
||||
ParseeSetRequestJSON(ctx, c);
|
||||
status = ParseeSetRequestJSON(ctx, c);
|
||||
|
||||
reply = JsonDecode(HttpClientStream(ctx));
|
||||
ret = StrDuplicate(JsonValueAsString(HashMapGet(reply, "event_id")));
|
||||
if (!ret)
|
||||
{
|
||||
Log(LOG_ERR, "Got %s from HTTP", HttpStatusToString(status));
|
||||
JsonEncode(reply, StreamStdout(), JSON_PRETTY);
|
||||
StreamPrintf(StreamStdout(), "\n");
|
||||
StreamFlush(StreamStdout());
|
||||
}
|
||||
JsonFree(reply);
|
||||
|
||||
HttpClientContextFree(ctx);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue