-
Notifications
You must be signed in to change notification settings - Fork 6
Don't return cached errors, allow to retry #36
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,4 +50,8 @@ export class RedisStorageAdapter implements StorageAdapter { | |
| const val = await this.client.get(key); | ||
| return val ?? undefined; | ||
| } | ||
|
|
||
| async delete(key: string): Promise<void> { | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this needs to go inside postgres adapter too, if you are not familiar with postgres, no worries i can take care of it too.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good thing is that Postgres adapter already has this :) |
||
| await this.client.del(key); | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you miss a return statement here? because the
setbelow will set the response anyway.https://github.com/mahendraHegde/node-idempotency/pull/36/files#diff-3c306f162d9ea758a7d4323df8bfe9476e1a263a7138ea8e22e531e30152b8fdR177-R184
also would you mind adding some tests like we have for other cases so that we could catch bugs like this early(I'd appreciate it if you could add tests for adapters too, if not i can add them too)?