You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When developing e.g. a CMS it's not always essential to have the local inngest dev server running in order for the app to work.
When sending an event, most of the time you'll have hooks in your CMS that call inngest.send() to trigger events on the system. If the local dev server isn't running, the Inngest SDK will try to send the event to the official https://inn.gs/ which fails with an 401 Event key Not Found error.
I want an option locally to make the inngest SDK silently fail instead throwing an error if the inngest event could not be sent.
Describe the solution you'd like
A flag that will allow allowSendingEventsWithoutDevServer
Describe alternatives you've considered
The workaround I implemented looks like this:
export const inngest = new Inngest({
name: 'app',
inngestBaseUrl: process.env.NODE_ENV === 'development' ? 'http://localhost:8288/' : undefined,
fetch:
process.env.NODE_ENV === 'development'
? async (input: RequestInfo | URL, init?: RequestInit) => {
try {
const response = await fetch(input, init);
return response;
} catch (e) {
console.warn(
'Local inngest dev server not running. Events not being processed. Start the dev server with "npx inngest-cli@latest dev"'
);
return {
status: 200,
} as Response;
}
}
: undefined,
});
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When developing e.g. a CMS it's not always essential to have the local inngest dev server running in order for the app to work.
When sending an event, most of the time you'll have hooks in your CMS that call
inngest.send()
to trigger events on the system. If the local dev server isn't running, the Inngest SDK will try to send the event to the officialhttps://inn.gs/
which fails with an401 Event key Not Found
error.I want an option locally to make the inngest SDK silently fail instead throwing an error if the inngest event could not be sent.
Describe the solution you'd like
A flag that will allow
allowSendingEventsWithoutDevServer
Describe alternatives you've considered
The workaround I implemented looks like this:
The text was updated successfully, but these errors were encountered: