Improve detection of errors in resource format.
Add error detection for the resource_type.
Typo