This article expands the example from the previous two, here and here, to add more specific error information.
As always the full code from the example is available here here.
Read more