# Return Custom Status Code (404) when Using IMediaListProvider

**URL:** https://community.wowza.com/t/return-custom-status-code-404-when-using-imedialistprovider/36753
**Category:** Wowza Streaming Engine
**Created:** [December 20, 2016, 10:30pm UTC](https://community.wowza.com/t/return-custom-status-code-404-when-using-imedialistprovider/36753 "2016-12-20T22:30:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Maxym\_Golovanchuk](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@Maxym\_Golovanchuk](https://community.wowza.com/u/Maxym_Golovanchuk)
#### Post date: [December 20, 2016, 10:30pm UTC](https://community.wowza.com/t/return-custom-status-code-404-when-using-imedialistprovider/36753/1 "2016-12-20T22:30:22Z")

</div>

Hello,

We need to be able to return a custom status code for IMediaListProvider generated manifests in some cases (for example when no renditions are available at the moment).

Using httpSession.rejectSession(); inside onHTTPSessionCreate does not work as onHTTPSessionCreate() comes before IMediaListProvider.resolveMediaList().

Is there a way how we can intercept the HTTP response for HLS/DASH manifests and set status code?

Thank you in advance,

Max
