# 502 Bad Gateway

**URL:** <https://forum.dfinity.org/t/502-bad-gateway/13513>\
**Category:** Developers\
**Created:** [June 5, 2022, 9:57am UTC](https://forum.dfinity.org/t/502-bad-gateway/13513 "2022-06-05T09:57:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![paulyoung](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/paulyoung/32/5251_2.png) [@paulyoung](https://forum.dfinity.org/u/paulyoung)\
**Post date:** [June 5, 2022, 6:56pm UTC](https://forum.dfinity.org/t/502-bad-gateway/13513/2 "2022-06-05T18:56:38Z")

</div>

I don’t know much about this but it looks like your `StreamingToken` type may be missing one or two fields.

> <https://github.com/dfinity/agent-rs/blob/076051a601dc5080ad6baf6d6034a109cca3ab00/ic-utils/src/interfaces/http_request.rs#L23-L30>

> [@Custom StreamingCallbackToken](https://forum.dfinity.org/t/custom-streamingcallbacktoken/9379/3):
>
> I think you have to abide by this [interface](https://github.com/dfinity/agent-rs/blob/076051a601dc5080ad6baf6d6034a109cca3ab00/ic-utils/src/interfaces/http_request.rs#L39) (since it’s what the Rust icx-proxy that’s running on the boundary node will expect and parse). So you can name the function anything you want (doesn’t have to be http\_request\_streaming\_callback) but you can’t change the token parameter I don’t think. The code where the icx-proxy actually calls your asset canister is [here](https://github.com/dfinity/icx-proxy/blob/d2cd4d822be4fa8d0af2f27e4dcc635d2032fcfb/src/main.rs#L261).

---

_[View the full topic](https://forum.dfinity.org/t/502-bad-gateway/13513)._
