Skip to content

[BUG] Panic if store.New returns an error #288

@andrew-rowson-lseg

Description

@andrew-rowson-lseg

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

sessions/sessions.go

Lines 139 to 140 in bb4cd60

session, err = store.New(s.request, name)
session.name = name

This doesn't check if the return from store.New is an error, and then prromptly panics with a nil deref if it is.

Expected Behavior

Error is returned, rather than panic

Steps To Reproduce

Use with a store implementation where New sometimes returns an error instead of a session.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions