# Display Custom Message to Client?

**URL:** <https://forums.plex.tv/t/display-custom-message-to-client/84734>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [December 1, 2014, 12:22am UTC](https://forums.plex.tv/t/display-custom-message-to-client/84734 "2014-12-01T00:22:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![InfernoZeus](https://avatars.discourse-cdn.com/v4/letter/i/3e96dc/32.png) [@InfernoZeus](https://forums.plex.tv/u/InfernoZeus)\
**Post date:** [December 1, 2014, 12:22am UTC](https://forums.plex.tv/t/display-custom-message-to-client/84734/1 "2014-12-01T00:22:31Z")

</div>

Is there anyway to display a custom message to the client?

&nbsp;

I've developed a channel which lists various videos even if they're technically not available yet. Trying to view one calls the service which then finds out if the video is available. If it isn't, I raise Ex.MediaNotAvailable which is mentioned somewhere (can't remember where I found it), but on the iOS client, that results in an extremely unhelpful message of "An unknown error occurred -12880".

&nbsp;

I'd much rather be able to say "This video is not yet available" as you might imagine.

---

<div class="post-metadata">

**Author:** ![spitfire1337](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@spitfire1337](https://forums.plex.tv/u/spitfire1337)\
**Post date:** [December 1, 2014, 3:23am UTC](https://forums.plex.tv/t/display-custom-message-to-client/84734/2 "2014-12-01T03:23:00Z")

</div>

This should do the trick:  
  
&nbsp;

```
return MessageContainer(
        "Video Not Available",
        "This video is not available for viewing yet. Please try again later."
    )
```

---

<div class="post-metadata">

**Author:** ![sander1](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@sander1](https://forums.plex.tv/u/sander1)\
**Post date:** [December 3, 2014, 8:21am UTC](https://forums.plex.tv/t/display-custom-message-to-client/84734/3 "2014-12-03T08:21:18Z")

</div>

> This should do the trick:  
>   
> &nbsp;
> 
> ```
> return MessageContainer(
> "Video Not Available",
> "This video is not available for viewing yet. Please try again later."
> )
> ```

MessageContainer has been deprecated. You can use an ObjectContainer and set the _header_ and _message_ value like this:

```
return ObjectContainer(
	header = "This is the header",
	message = "This is the message"
)
```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 21, 2019, 3:43am UTC](https://forums.plex.tv/t/display-custom-message-to-client/84734/4 "2019-12-21T03:43:17Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
