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

[record-hook] plugin fails silently when sheet slug is incorrect #32

Open
alexhollenbeck opened this issue May 22, 2023 · 0 comments
Open
Labels
enhancement New feature or request recordHook

Comments

@alexhollenbeck
Copy link
Contributor

alexhollenbeck commented May 22, 2023

When using plugin-record-hook, you have to pass a sheet slug specifying which sheet you are attaching the record hook to:

listener.use(
    recordHook('mySheetSlug', (record: FlatfileRecord) => {
        ...

If mySheetSlug does not exist in whatever configuration I am deploying to / developing with, the record hook will silently fail (do nothing). This make its usage somewhat brittle, since sheet slugs have to be stored in multiple places and have to be kept manually up to date.

It would be nice if, at the very least, I got a warning somewhere that I had a record hook attached to a non-existent sheet.

@alexhollenbeck alexhollenbeck added the enhancement New feature or request label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request recordHook
Projects
None yet
Development

No branches or pull requests

2 participants