docs/errors.html
---
title: "Yt::Errors"
h2: "Errors"
---
<p>
<code>Yt::Errors</code> define error classes that are raised when something goes wrong.
</p>
{% highlight ruby %}
channel = Yt::Channel.new id: 'this-id-does-not-exist'
channel.title # => raise Yt::NoItemsError
{% endhighlight %}
<hr />
<h4>List of errors</h4>
<dl>
{% include dt.html title="No Items" %}
<p>
<code>Yt::NoItemsError</code> is raised when items are expected from YouTube but none are returned.
</p>
{% highlight ruby %}
channel = Yt::Channel.new id: 'this-id-does-not-exist'
channel.title # => raise Yt::NoItemsError
{% endhighlight %}
</dl>