sessions icon indicating copy to clipboard operation
sessions copied to clipboard

Don't propagate "not exist" error if trying to erase a session matchi…

Open mariusor opened this issue 4 years ago • 4 comments

Summary of Changes

Don't consider "oserror.ErrNotExist" as a failure when trying to erase a session which corresponds to a missing file.

Hello, in the current implementation if a request contains a session token that has been stored in a file that has been deleted the and we're trying to erase it using the Options.MaxAge = -1 workaround, the action still fails, because the missing file error gets propagated higher in the stack.

This small fix prevents this, and ensures that the session is regenerated.


This is a reopen of #237 which was closed by the stale bot.

mariusor avatar Dec 29 '21 14:12 mariusor

Checks out to me, I recommend this is merged in after #253

DavidLarsKetch avatar Jan 20 '22 15:01 DavidLarsKetch

Thank you for the support @DavidLarsKetch :) Are you affiliated with the project in an official capacity?

mariusor avatar Jan 23 '22 12:01 mariusor

Not yet, just trying to lend a hand with review. I think @elithrar is still the only one with write permissions.

DavidLarsKetch avatar Jan 25 '22 14:01 DavidLarsKetch

This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days.

stale[bot] avatar Apr 27 '22 22:04 stale[bot]

Codecov Report

Merging #252 (b0eac4a) into main (69327c5) will not change coverage. The diff coverage is 0.00%.

@@           Coverage Diff           @@
##             main     #252   +/-   ##
=======================================
  Coverage   76.86%   76.86%           
=======================================
  Files           4        4           
  Lines         268      268           
=======================================
  Hits          206      206           
  Misses         54       54           
  Partials        8        8           
Files Changed Coverage Δ
store.go 78.01% <0.00%> (ø)

codecov[bot] avatar Aug 17 '23 17:08 codecov[bot]

Whoa! Thank you @coreydaley :partying_face:

mariusor avatar Aug 18 '23 07:08 mariusor