Check if content type exists?

Im doing this:
const cte = await environment.getContentType(‘input’);
if (cte) {
To see if a content type exists, but I’m getting an error 400 because it doesn’t exists
Do you know how could this be done ? without getting error ?

Thanks!! :slight_smile:


await environment
.then(response => {
return response.unpublish();
.then(response => {
return response.delete();
.catch(err => console.log(‘No content type found…’));

Just in case someone need it.