title: How to find out which resource not found while publishing message to Google Cloud Pub/Sub?
body: <p>I am very new to Google Cloud. I want to accomplish message publishing to Google Cloud Pub/Sub service from my nodejs app. However, I received an error below while publishing the message:</p>
  <pre><code>Received error while publishing: Error: 5 NOT_FOUND: Resource not found (resource=193060).
  </code></pre>
  <p>I cannot figure <code>resource=193060</code> out. What is 193060?</p>
  <p><em><strong>Here is my <em>server.js</em>:</strong></em></p>
  <pre><code>const express = require('express');
  const app = express();
  const bodyParser = require(&quot;body-parser&quot;);
  const {PubSub} = require('@google-cloud/pubsub');
  
  // parse application/json
  app.use(bodyParser.json({limit: '10mb'}))
  
  // Creates a client; cache this for further use
  const pubSubClient = new PubSub();
  const topicName = 'projects/codeway-312008/topics/codeway-log';
  const data2 = JSON.stringify({
      type: 'event',
      app_id: 'com.codeway.test',
      session_id: 'vIfEMi9kJW',
      event_name: 'about',
      event_time: 1598196427881,
      page: 'settings',
      country: 'US',
      region: 'New Jersey',
      city: 'Newark',
      user_id: '9t0lrnYLQr'
  });
  
  
  async function publishMessage() {
      // Publishes the message as a string, e.g. &quot;Hello, world!&quot; or JSON.stringify(someObject)
      const dataBuffer = Buffer.from(data2);
  
      try {
          const messageId = await pubSubClient.topic(topicName).publish(dataBuffer);
          console.log(`Message ${messageId} published.`);
      } catch (error) {
          console.error(`Received error while publishing: ${error}`);
          process.exitCode = 1;
      }
  }
  
  
  publishMessage();
   
  </code></pre>
  <p><em><strong>My topic:</strong></em></p>
  <p><a href="https://i.stack.imgur.com/Qbu43.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qbu43.png" alt="enter image description here" /></a></p>