We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2c289a commit e4ea336Copy full SHA for e4ea336
src/Http/HttpHelper.php
@@ -149,10 +149,16 @@ public static function getJoltBody(string $contents): stdClass
149
$rtr->info = $value;
150
break;
151
case 'error':
152
- if (isset($rtr->error)) {
+ if (isset($rtr->errors)) {
153
throw new UnexpectedValueException('Jolt response with multiple error rows received');
154
}
155
- $rtr->error = $value;
+ $rtr->errors = [];
156
+ foreach ($value->errors as $error) {
157
+ $rtr->errors[] = (object) [
158
+ 'code' => self::splitJoltSingleton($error->code)[1],
159
+ 'message' => self::splitJoltSingleton($error->message)[1],
160
+ ];
161
+ }
162
163
default:
164
throw new UnexpectedValueException('Jolt response with unknown key received: '.$key);
0 commit comments