Title: Handle non-json errors · Issue #29 · ConvertAPI/convertapi-library-php · GitHub
Open Graph Title: Handle non-json errors · Issue #29 · ConvertAPI/convertapi-library-php
X Title: Handle non-json errors · Issue #29 · ConvertAPI/convertapi-library-php
Description: Hello, I am getting the following error: TypeError Cannot access offset of type string on string from the file: lib/ConvertApi/Client.php:156 This is because the server returns a non-json string. This case should throw an Error\Api just ...
Open Graph Description: Hello, I am getting the following error: TypeError Cannot access offset of type string on string from the file: lib/ConvertApi/Client.php:156 This is because the server returns a non-json string. T...
X Description: Hello, I am getting the following error: TypeError Cannot access offset of type string on string from the file: lib/ConvertApi/Client.php:156 This is because the server returns a non-json string. T...
Opengraph URL: https://github.com/ConvertAPI/convertapi-library-php/issues/29
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Handle non-json errors","articleBody":"Hello, I am getting the following error:\r\n`TypeError Cannot access offset of type string on string`\r\nfrom the file:\r\n`lib/ConvertApi/Client.php:156`\r\n\r\nThis is because the server returns a non-json string.\r\nThis case should throw an Error\\Api just like a json-error.\r\nJust add this before using the $json as an array, on line 156:\r\n`if (is_string($json)) throw new Error\\Api($json);`\r\n\r\n","author":{"url":"https://github.com/gufoe","@type":"Person","name":"gufoe"},"datePublished":"2022-04-04T12:22:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/29/convertapi-library-php/issues/29"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:82cb92d1-ed24-66e9-f75b-d4684ce5d1a9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 804E:184509:1E4DBBC:284A315:697D3747 |
| html-safe-nonce | 56c084d8d5deb79b2d7003a050be175dd2bffa59169f38ddf79c62764512679d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDRFOjE4NDUwOToxRTREQkJDOjI4NEEzMTU6Njk3RDM3NDciLCJ2aXNpdG9yX2lkIjoiNzA1NTAwMjE3NTExNzUzOTE0MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9804b304ef668f3f96e36aabdac6241c725017e976dc4c4cce9caf2aeaa5ff23 |
| hovercard-subject-tag | issue:1191706077 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ConvertAPI/convertapi-library-php/29/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2395bbc319ab0783ac173101cb571a5b6e5336a845d7befa8866f9e0b5c1d180/ConvertAPI/convertapi-library-php/issues/29 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2395bbc319ab0783ac173101cb571a5b6e5336a845d7befa8866f9e0b5c1d180/ConvertAPI/convertapi-library-php/issues/29 |
| og:image:alt | Hello, I am getting the following error: TypeError Cannot access offset of type string on string from the file: lib/ConvertApi/Client.php:156 This is because the server returns a non-json string. T... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gufoe |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9a3c7e308524eda8bf7076517aaba4e7e7984217dc521d1404369c0c497afdde |
| turbo-cache-control | no-preview |
| go-import | github.com/ConvertAPI/convertapi-library-php git https://github.com/ConvertAPI/convertapi-library-php.git |
| octolytics-dimension-user_id | 37071453 |
| octolytics-dimension-user_login | ConvertAPI |
| octolytics-dimension-repository_id | 132747941 |
| octolytics-dimension-repository_nwo | ConvertAPI/convertapi-library-php |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 132747941 |
| octolytics-dimension-repository_network_root_nwo | ConvertAPI/convertapi-library-php |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4b41f2aeb2bdce4f2f8278e78f7fe2b38a9cd441 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width