Adds custom exception when a handler cannot be resolved.