[fixes #391] exception when wrong resource type in URL
Merge pull request #559 from ZogStriP/fix-exception-when-wrong-resource-type-in-url

[fixes #391] exception when wrong resource type in URL