"There's nothing here, yet." Error message on Heroku - heroku

I'm getting a "There's nothing here, yet." notification when I access this address:
https://gft-authentic-api.herokuapp.com/api/creature/1
Any idea why that is happening?
I visited the URL and was expecting to see this image:
https://s3-us-west-2.amazonaws.com/digitalcollectibles/dp2/2019_DP2_GFT_Poster_02.jpg

Related

BlobClient - What is the recommended way to check if my upload was successfull?

The Azure blob client's Upload method returns a Response<BlobContentInfo>.
If the upload throws an exception, than something is wrong, that's clear.
Failure cases, like bad connection string or no internet connection does throw an exception. And it retries by default.
But if I do get a Response back, can still something be wrong?
On the BlobContentInfo I see no indicator of any error.
The Response has a GetRawResponse method, and there is a IsError bool flag on that, and a Status for HTTP status code. But no specific description if something goes wrong.
Maybe check for IsError, and try to log the response, if it's true, and assume it did work, if there is no error. And check the ContentHash I guess.
But if I do get a Response back, can still something be wrong?
No. It would mean what you were trying to upload got uploaded successfully.
If your upload fails, the method will raise an exception of type RequestFailedException.

Authorization error: "Something went wrong on our end. Sorry about that"

Using this code in a browser to get the access code...
https://api.pinterest.com/oauth/?response_type=code&redirect_uri=https://example.com/redirect.htm&client_id=appid&scope=read_public,write_public&state=768uyFys
I got a dialog and when I pressed OK, then I got this error:
{"status": "failure", "code": 12, "data": "path: /oauth/\nparams:<dict_itemiterator object at 0x7f9735706710>\nAuthError(code=500, message='dial tcp 127.0.0.1:22000: connect: connection refused')", "message": "Something went wrong on our end. Sorry about that.", "endpoint_name": "oauth_connect"}
I also faced an issue like this. You can paste the URL on google browser and copy the redirect_url and add the same in the Pinterest app. Pinterest will call the redirect URL after hitting the API. You can add logs in your application where the redirect URL is hitting to verify the response.
https://api.pinterest.com/oauth/?state=9750187663&scope=read_public&client_id=abc&redirect_uri=https://9fa6caa3.ngrok.io/laravel/public/pinToken&response_type=code
You will get the result
array (
'state' => '9750187663',
'code' => '15a1bcfb012abc1',
)

Changes to app.rb don't seem to go into effect

I need to test a GET request in sendRequest.js:
$.get( '/test/test2', {name: 'Larry', time: '2pm'} );
This sends the request fine and everything works on the JavaScript end, but obviously returns a 404 (route not found) so I added in app.rb:
get '/test/test2' do
logger.info "this is a test log"
end
I sent the request again, and I got the same 404.
This scenario originates from none of my changes in app.rb going into effect. I've deleted entire routes, commented stuff out, etc., nothing I do in app.rb seems to have any effect on the server.
Any ideas?
Have you tried stopping and restarting the server?
By default Sinatra won't know its code has changed, and Ruby will have loaded all the script into memory and won't look at the file.
Stopping the server, by using Cntrl+C then restarting the server will refresh Ruby's idea of what should be done.

Meteor errors internationalization

I'm trying to implement internationalization through just-i18n and it works fine so far.
Problem is I'm also using accounts-password and especially Meteor.loginWithPassword(user, password, [callback]).
On login error, the callback has an error object that basically looks like this :
{
details: undefined,
error: 403,
errorType: "Meteor.Error",
message: "User not found [403]",
reason: "User not found"
}
I thought the error code was unique and went with a i18n configuration file like this :
i18n.map 'fr_FR',
login:
signin: 'S\'authentifier'
errors:
403: 'L\'utilisateur n\'existe pas'
So I could call it this way :
Session.set "error", i18n("errors." + err.error)
But actually, no matter what's the error, user not found or incorrect password, the error code is not unique :
{
details: undefined,
error: 403,
errorType: "Meteor.Error",
message: "Incorrect password [403]",
reason: "Incorrect password"
}
As i don't consider checking on a string value really consistent, how can i differenciate both ?
How would I go implementing internationalization with meteor built-in login ?
403 here is not a Meteor number for the particular error, but rather a HTTP status code. The same code can be caused by different errors.
Since the only difference between the error objects you get are reason and message, you need to use one of them to set up the internationalization code. They shouldn't change too much between Meteor releases, so you should be fine with this solution.
i18n.map 'fr_FR',
login:
signin: 'S\'authentifier'
errors:
403:
'Incorrect password': 'Le password est incorrectu'
'User not found': 'L\'utilisateur n\'existe pas'
Ah, and don't worry, login, signin, errors and 403 are internally represented as strings as well, so there's nothing inconsistent in such solution.

"Server Error" when users try to create a new account - Magento 1.7

I'm setting up our Magento 1.7 store, hoping to be ready for launch soon. I've noticed a problem:
When users try to create a new account, they fill out their info on /customer/account/create page just fine, then when they click submit, they get this 500 Error:
The website encountered an error while retrieving
http://example.com/customer/account/createpost/.
the account is actually created, however.
Similar deal on when users submit their email on the Forgot Password page, they press submit and get this:
The website encountered an error while retrieving
http://example.com/customer/account/forgotpasswordpost/.
no email is sent.
If you see this and know how to help with this prob, your advice would be much appreciated, truly.
In case it helps, we are using a theme, rather than default.
EDIT - (I was asked if I had checked server error)
My server errors show as this, for the above situations:
Forgot Password submit shows this error:
Fatal error: Call to undefined method Mandrill_API::addTo() in
D:\Magento\app\code\core\Mage\Core\Model\Email\Template.php on line
438
and
Create Account submit shows this error:
Fatal error: Call to undefined method Mandrill_API::addTo() in
D:\Magento\app\code\core\Mage\Core\Model\Email\Template.php on line
438
as well.
Here is 6 lines(437-442) of that Template.php file:
foreach ($emails as $key => $email) {
$mail->addTo($email, '=?utf-8?B?' . base64_encode($names[$key]) . '?=');
}
$this->setUseAbsoluteLinks(true);
$text = $this->getProcessedTemplate($variables, true);
[UPDATE]
I've learned that when I enter a random, fake email for Forgot Password, and press submit, a confirmation appears, saying something like "If this email exists, then a new email was sent to that email!", but when I submit an email of a real existing customer, then it gives me the 500 error I've mentioned.
Still nothing - if anyone out there sees this, and you have a bit of time to help solve this perhaps, may Talos bless you!
[SOLVED]
I turns out this was a problem with transaction emails.
Cause by an extension, Mandrill, which is added to magento when I installed the MailChimp extension, called "MageMonkey - MailChimp Integration by ebizmarts"
Once I enabled Mandrill, in config, advanced, all transactions and transaction emails work perfectly fine!
It's possible that it's a .htaccess or server configuration problem. Where is it hosted? Do you have a .htaccess file in the root of the installation?

Resources