helpshift / helpshift/kafboy

badarg On POST

Open
#1 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Erlang
Stars
37
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Hello! I am exploring using kafboy for a project of mine, however, I have encountered the following error with POSTing JSON to kafboy.

Client Executes:

```
B = iolist_to_binary(mochijson2:encode({struct,
[{timestamp, <<"2014-11-4 22:12:21">>},
{owner, <<"OwnerData">>},
{peer, <<"PeerData">>},
{src_lang, <<"en">>},
{body, <<"Chat test!">>}]})).

Req = {"http://localhost:8000/async/chat", [], "application/json", B}.

httpc:request(post, Req, [], []).
```

The POST is processed by kafboy, however, kafboy reports the following error:

```
Error in process <0.1592.0> on node 'kafboy@127.0.0.1' with exit value: {badarg,[{erlang,byte_size,[true],[]},{ekaf_protocol_produce,encode_message,1,[{file,"src/ekaf_protocol_produce.erl"},{line,138}]},{ekaf_protocol_produce,encode_messages,2,[{file,"src/ekaf_protocol_produce.erl"},{line...
```

Is there something incorrect with how I am submitting this POST request?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.