mautic / mautic/api-library

API error The response has unexpected status code (0)

Open
#248 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
205
Forks
129
PR merge metrics
No merged PRs in 30d

Description

Hi! I’m trying to connect with the API using Basic Auth but I’m getting an error 0.
It’s not a caché problem, i’m deleting the caché frequently.
The full response it’s:

array(1) { [“errors”]=> array(1) { [0]=> array(2) { [“code”]=> int(0) [“message”]=> string(56) "The response has unexpected status code (0). Response: " } } }

That’s my code:
Captura

And all good in the config:
Captura2

Thanks!

UPDATE:
The code return the same error in post/update but works!

It’s not working only for GET method, only returns the 0 error.

Any help? Thanks!


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named. Start by reproducing the Basic Auth GET request described in the issue and compare it with the working POST/update requests; done means the cause of status code 0 is identified and the GET behavior is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.