Skip to content

🐛 Bug - Self hosted instance fails to launch without a SendGrid API Key #1393

@micah686

Description

@micah686

Describe the bug
If you launch the software locally without a SendGrid API key, the server gets an exception of: Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'apiKey')

To Reproduce
Steps to reproduce the behavior:

  1. Make sure ApiKey under Email in appsettings.json is blank
  2. Run Valour.Server.csproj
  3. An exception will be thrown
  4. See error

Expected behavior
I expected to either to launch the software without an official email API key, or have a local fake email server for testing.

Error Message

Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'apiKey')
   at SendGrid.SendGridClientOptions.set_ApiKey(String value)
   at SendGrid.SendGridClient.buildOptions(String apiKey, String host, Dictionary`2 requestHeaders, String version, String urlPath, Boolean httpErrorAsException)
   at SendGrid.SendGridClient..ctor(String apiKey, String host, Dictionary`2 requestHeaders, String version, String urlPath)
   at Valour.Server.Email.EmailManager.SetupClient() in /home/micah/RiderProjects/Valour/Valour/Server/Email/EmailManager.cs:line 19

System Information:

  • OS: CachyOS (Linux, Arch Based)
  • Valour Version: 0.4.16
  • Valour Platform: Web App/Server
    • Browser: chromium

Additional context
Debugging with Jetbrains Rider

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingNeeds Looking AtThis issue needs to be looked at

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions