Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The GET «https://sandbox.moip.com.br/v2/preferences/notifications» API endpoint is down today (2017-10-19): «502 Proxy Error: The proxy server received an invalid response from an upstream server». We should handle this in a proper way. #21

Closed
dmitrii-fediuk opened this issue Oct 19, 2017 · 2 comments

Comments

@dmitrii-fediuk
Copy link
Member

dmitrii-fediuk commented Oct 19, 2017

The API endpoint is decribed here: https://dev.moip.com.br/v2.0/reference#listar-todas-preferencias-de-notificacao
It had been worked for last months, but today the Moip API server responds:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Proxy Error</title>
</head><body>
<h1>Proxy Error</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
The proxy server could not handle the request <em><a href="/v2/preferences/notifications">GET&nbsp;/v2/preferences/notifications</a></em>.<p>
Reason: <strong>Error reading from remote server</strong></p></p>
</body></html>

For now, it leads to the following exception in my extension:

#0 \vendor\mage2pro\core\API\Client.php(227): df_error_create('The \xC2\xABpreferenc...')
#1 \vendor\mage2pro\core\API\Client.php(87): Df\API\Client->_p()
#2 \vendor\mage2pro\core\Core\lib\cache.php(103): Df\API\Client->Df\API\{closure}()
#3 \vendor\mage2pro\core\Core\lib\cache.php(296): {closure}('94bfacacce31314...')
#4 \vendor\mage2pro\core\Core\lib\cache.php(107): dfcf(Object(Closure), Array, Array)
#5 \vendor\mage2pro\core\API\Client.php(87): df_cache_get_simple('0=>https://sand...', Object(Closure), Array)
#6 \vendor\mage2pro\core\API\Facade.php(124): Df\API\Client->p()
#7 \vendor\mage2pro\core\API\Facade.php(26): Df\API\Facade->p()
#8 \vendor\mage2pro\moip\API\Facade\Notification.php(40): Df\API\Facade->all()
#9 \vendor\mage2pro\moip\FE\Webhooks.php(65): Dfe\Moip\API\Facade\Notification->targets()
#10 \vendor\mage2pro\core\Framework\Plugin\Data\Form\Element\AbstractElement.php(96): Dfe\Moip\FE\Webhooks->onFormInitialized()
#11 \generated\code\Df\Framework\Plugin\Data\Form\Element\AbstractElement\Interceptor.php(63): Df\Framework\Plugin\Data\Form\Element\AbstractElement->afterSetForm(Object(Dfe\Moip\FE\Webhooks\Interceptor), Object(Dfe\Moip\FE\Webhooks\Interceptor))
@dmitrii-fediuk
Copy link
Member Author

The GET «https://sandbox.moip.com.br/v2/preferences/notifications» API endpoint is down today (2017-10-19): «502 Proxy Error: The proxy server received an invalid response from an upstream server»: https://mage2.pro/t/4721

@dmitrii-fediuk dmitrii-fediuk changed the title The Moip API server sometimes is down: «The proxy server received an invalid response from an upstream server». We should handle this in a proper way. The GET «https://sandbox.moip.com.br/v2/preferences/notifications» API endpoint is down today (2017-10-19): «502 Proxy Error: The proxy server received an invalid response from an upstream server». We should handle this in a proper way. Oct 19, 2017
dmitrii-fediuk added a commit to mage2pro/core that referenced this issue Oct 19, 2017
dmitrii-fediuk added a commit that referenced this issue Oct 19, 2017
@dmitrii-fediuk
Copy link
Member Author

I handle this exception since the 1.2.0 version:
03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant