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

invalid event exception #94

Open
kodeine opened this issue Nov 17, 2021 · 2 comments
Open

invalid event exception #94

kodeine opened this issue Nov 17, 2021 · 2 comments

Comments

@kodeine
Copy link
Contributor

kodeine commented Nov 17, 2021

image
any idea's why this is happening? i have included the context module in app module.

@kodeine
Copy link
Contributor Author

kodeine commented Nov 17, 2021

duplicate of #70

i used

export const eventBusConfig = (allowedEvents): EventBusConfigType => ({
  read: {
    allowedEvents,
  },
  write: {
    serviceName: process.env.APP_NAME,
    validate: null,
    prepare: null,
  },
});

but i still get the same validation error.

@kodeine
Copy link
Contributor Author

kodeine commented Nov 21, 2021

Okay so the problem is in the readme and interface.

export const eventBusConfig = (allowedEvents): EventBusConfigType => ({
  read: {
    allowedEvents,
  },
  write: {
    serviceName: process.env.APP_NAME,
    validate: false, ----> wrong here
    prepare: false, ----> wrong here
  },
 validate: false, ---> works
 prepare: false ---> works
});

Secondly, setting validate to true, i was getting error that corelation-id is missing. But after setting to false, it bypasses validation, but in the event itself i see in metadata,

image

correlation_id is present! so if it could generate why it didn't before when the value to validate was true?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant