One, this needs to be Strict Equals `===`. By and large the normal Equals `==` operator in javascript is a poor option because of the conversion it will do depending on the type it is comparing.

Two, there are some style tweaks that need to be made.

Three, you need to return early here. With your current code the errorCallback is called twice.

```javascript
if ( resp.error.message.substring( 0, 7 ) === "Private" ) {
  return errorCallback( YOUTUBE_EMBED_PRIVATE );
}
```

Also, I'm going to do some digging to see how the responses compare for the generic kinds of errors. Generally, doing just some form of  string comparison here isn't wise.