mollie / mollie-api-php

Mollie API client for PHP
http://www.mollie.com
BSD 2-Clause "Simplified" License
552 stars 191 forks source link

Invoices API v1: internal server error when trying to include InvoiceLines #564

Closed holtkamp closed 3 years ago

holtkamp commented 3 years ago

Specifications

Describe the issue

When loading "all" Invoices, it is allowed to "include" the (invoice) lines in the response: https://docs.mollie.com/reference/v1/invoices-api/get-invoice#includes

Trying to do so results in:

[Mollie_API_Exception]                                                                                
  Error executing API call (system): Internal server error; we have been informed about this incident. 

When leaving out the lines value as include, this error does not occur.

sandervanhooft commented 3 years ago

Hi @holtkamp , is this behaviour still occurring?

holtkamp commented 3 years ago

@sandervanhooft yes it does...

holtkamp commented 3 years ago

@sandervanhooft any update on this, just checked and this behaviour still occurs 👀

sandervanhooft commented 3 years ago

Let me check

sandervanhooft commented 3 years ago

Hi @holtkamp ,

Can you share the specific code you're using? We cannot reproduce the issue here.

holtkamp commented 3 years ago

@sandervanhooft something like this:

$offset = 0;
$limit = 250;
$filters = [
    'include' => 'lines',
];

/* @var Mollie_API_Client $apiClient */
$result = $apiClient->invoices->all($offset, $limit, $filters);

results in

[Mollie_API_Exception]                                                                                
  Error executing API call (system): Internal server error; we have been informed about this incident.

The error message suggests it is logged and the team is/will be informed, so hopefully the request can be easily identified? 😉

Note that the APIClient used OAuth2 for authentication.

sandervanhooft commented 3 years ago

Hi @holtkamp,

That code snippet really helped to pinpoint the problem on Mollie's end. Can you check if the issue has been solved now?

holtkamp commented 3 years ago

@sandervanhooft thanks, now it works again!

Can you share details of the cause? (always curious 😉 )

sandervanhooft commented 3 years ago

Thanks @holtkamp for following up! It seemed to have been an internal error. May have slipped in with v1 being deprecated for some time and Mollie moving forward quite fast on v2.