Skip to content
This repository was archived by the owner on Apr 26, 2020. It is now read-only.

Commit f89d424

Browse files
hranickaantonmedv
authored andcommitted
Fix Sentry "Unsupported media type 'application/json, application/json' in request" (#224)
* sentry: do not send Content-Type: application/json twice The header is already set by called Httpie library. Calling ::header just adds a new header, does not do any replace. Sentry does not recognize the request when we send the headers twice and fails with error: ``` [RuntimeException] on [factcool-www3.superhosting.cz] Unable to create a release: Array ( [detail] => Unsupported media type 'application/json, application/json' in request. ) ``` * changelog: update
1 parent c3ce86a commit f89d424

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
### Added
88
- Add APCu support in cachetool recipe
9+
- Fixed Sentry deployment recipe, updated to work with latest deployer/deployer
910

1011
## 6.2.0
1112
[6.1.0...6.2.0](https://github.com/deployphp/recipes/compare/6.1.0...6.2.0)

recipe/sentry.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ static function (&$value) use ($config) {
8282
$releasesApiUrl
8383
)
8484
->header(sprintf('Authorization: Bearer %s', $config['token']))
85-
->header('Content-Type: application/json')
8685
->body($releaseData)
8786
->getJson();
8887

@@ -113,7 +112,6 @@ static function (&$value) use ($config) {
113112
$releasesApiUrl . $response['version'] . '/deploys/'
114113
)
115114
->header(sprintf('Authorization: Bearer %s', $config['token']))
116-
->header('Content-Type: application/json')
117115
->body($deployData)
118116
->getJson();
119117

0 commit comments

Comments
 (0)