Bug 1037054 - FxOS Loop client app bits for bug 1016277

See bug https://bugzilla.mozilla.org/show_bug.cgi?id=1037054 please.
same as above, if type is unknown we should throw