         }
         return value
       .catch (rejection) ->
-        Promise.reject new hinoki.errors.PromiseRejected path, container, rejection
+        Promise.reject new hinoki.PromiseRejectedError path, container, rejection
 
   ###################################################################################
   # functions that resolve factories

    try
      valueOrPromise = factory.apply null, dependencyValues
    catch error
      return Promise.reject new hinoki.errors.ErrorInFactory path, container, error

    unless hinoki.isThenable valueOrPromise
      # valueOrPromise is not a promise but an value

    try
      resolution = hinoki.resolveInContainers containers, path, debug
    catch error
      return Promise.reject new hinoki.ErrorInResolversError path, containers, error

    # from here on we use the name and container returned by the resolver
    # (resolution.name and resolution.container)
    # which might differ from what was originally searched (path[0]).

    if resolution instanceof Error
      return Promise.reject new hinoki.ErrorInResolversError path, containers, resolution

    unless resolution?
      # we are out of luck: the factory could not be found
      return Promise.reject new hinoki.UnresolvableError path, containers

    resolutionErrors = hinoki.resolutionErrors resolution

    if resolutionErrors?
      return Promise.reject new hinoki.InvalidResolutionError path, resolution, resolutionErrors

    unless hinoki.isUndefined resolution.value
      debug? {
