Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown resource ID in error message #1269

Closed
fukit0 opened this issue Apr 27, 2021 · 1 comment
Closed

Unknown resource ID in error message #1269

fukit0 opened this issue Apr 27, 2021 · 1 comment
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API.

Comments

@fukit0
Copy link

fukit0 commented Apr 27, 2021

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

I am getting Resource not found (resource=193060) when I try to publish message to Pub/Sub. How to find out which resource is that?

My source code is like:

const express = require('express');
const app = express();
const bodyParser = require("body-parser");
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. "Hello, world!" 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();
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/nodejs-pubsub API. label Apr 27, 2021
@fukit0
Copy link
Author

fukit0 commented Apr 27, 2021

The schema associated with topic was deleted.

@fukit0 fukit0 closed this as completed Apr 27, 2021
feywind pushed a commit to feywind/nodejs-pubsub that referenced this issue Nov 12, 2024
…is#1269)

* feat: publish RateLimitInfo and FeatureFlag protos

PiperOrigin-RevId: 527878708

Source-Link: googleapis/googleapis@f129f48

Source-Link: https://github.com/googleapis/googleapis-gen/commit/e02c87d9d0c9a77f2b17268a86f462b5a1d66bbd
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTAyYzg3ZDlkMGM5YTc3ZjJiMTcyNjhhODZmNDYyYjVhMWQ2NmJiZCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix: Add feature flag proto to BUILD file

PiperOrigin-RevId: 528468347

Source-Link: googleapis/googleapis@38247e8

Source-Link: https://github.com/googleapis/googleapis-gen/commit/17e62a1ab5f22d7d537675a659157207e406e63d
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTdlNjJhMWFiNWYyMmQ3ZDUzNzY3NWE2NTkxNTcyMDdlNDA2ZTYzZCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: add ChangeStreamConfig to CreateTable and UpdateTable

PiperOrigin-RevId: 534836567

Source-Link: googleapis/googleapis@eb2d1f1

Source-Link: https://github.com/googleapis/googleapis-gen/commit/64cebcfc2765bff5afb19c140d4b1600dfdaebad
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjRjZWJjZmMyNzY1YmZmNWFmYjE5YzE0MGQ0YjE2MDBkZmRhZWJhZCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: sofisl <[email protected]>
Co-authored-by: danieljbruce <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API.
Projects
None yet
Development

No branches or pull requests

1 participant