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