Skip to content

Commit

Permalink
Merge pull request #463 from AlbinoDrought/trim-fix-415-error
Browse files Browse the repository at this point in the history
Add TROUBLESHOOTING.md section about fixing error 415
  • Loading branch information
thinkingserious authored Oct 11, 2017
2 parents 8c9be42 + e515c3f commit 72daaf7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ If you can't find a solution below, please open an [issue](https://github.com/se
* [Versions](#versions)
* [Environment Variables and Your SendGrid API Key](#environment)
* [Using the Package Manager](#package-manager)
* [Fixing Error 415](#error-415)

<a name="migrating"></a>
## Migrating from v2 to v3
Expand Down Expand Up @@ -87,3 +88,14 @@ In most cases we recommend you download the latest version of the library, but i
}
}
```

<a name="error-415"></a>
## Fixing Error 415

If you're getting the following error while using this library:

`Content-Type should be application/json.`

It is most likely due to a linebreak in your API key. Passing your key through `trim` should fix this:

`$apiKey = trim($apiKey)`

0 comments on commit 72daaf7

Please sign in to comment.