catch LookupError when determining the content-type'