Skip to content

Error Exposes API Key in Log #104

@daniellionel01

Description

@daniellionel01

Describe the bug

Used this library in my app on Stream. There was an error in the HTTP request and it printed out the full request with headers and also the API Key.

Not a big deal in my case since I quickly generated a new key, but I'm sure there's a better way to do this.

Maybe providing an extra argument like "hide_key" could be implemented that modifies the request in such a way to hide sensitive data.

Willing to create a PR and do this on my own, but just wanted to get some input first.

Thank you :)

To Reproduce

/

Code snippets

No response

OS

macOS

Elixir version

Elixir 1.17.3

Library version

openai_ex 0.8.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions