How to show laravel api error in digitalocean? - laravel

I deploy my Laravel + vue project on the Digitalocean apps and some of my api are working but some are not.
When I look into the api response I received message: "Server Error",
But the api is working on localhost and gives error after the deployment.
Is there a way to view the actual error message of the api reponse? so that I can easily understand what causing the error and fix it.
But I really find it weird that it causing error in the digitalocean apps, but works on my local machine.
I've tried searching for hours how to view the errors but I can't find it.
please help me. Thank you!

You can log in to your server and look in the file storage/logs/laravel.log.
Otherwise, I would suggest using a service such as Bugsnag or Sentry, which have integrations with laravel and will give you a dashboard with all your errors
Some people suggest putting APP_DEBUG to true, but that is a security risk as your customers will be able to see the error as well, and you should never do this on a production server

Related

Forbidden 403 Access URL API in Laravel

Good afternoon, let me ask
I created a service API using Laravel, but one of the API urls when I sent the response parameter was 403 or Forbidden. even though before it was fine, it worked smoothly. And I raised it to the server instead it became Forbide. Anyone know why? thank you for answering
If it is ok on local and getting a forbidden error on the server, the problem might be caused by the webserver application. please take a look at this link.

Google Translate works well on localhost but throws `429 Too Many Requests` error on the live server

I am using this Laravel google translate package to translate the website based on the user's locale. I configured everything well and the translation seems to work quite well on the localhost. However, when I upload the website to the server, google translate throws error 429 too many requests:
[2020-09-17 08:04:03] production.ERROR: Client error: `GET https://translate.google.com/translate_a/single?client=webapp&hl=en&dt=t&dt=bd&dt=at&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&sl=auto&tl=en&q=Canl%C4%B1+Bahisler&ie=UTF-8&oe=UTF-8&multires=1&otf=0&pc=1&trs=1&ssel=0&tsel=0&kc=1&tk=40965.430971` resulted in a `429 Too Many Requests` response:
I have tried searching for the cause of the error and found this post in google groups talking about exceeded quota but I don't think that applies to my case since I am only translating a few texts that can't get to that limit. Does someone have an idea on how to solve this?

Endpoint Server GraphQL (overblog-GraphQLBundle) Not support Method POST

For 3 Days, my project which worked perfectly locally, once put on the production server.
GraphQl requests are a failure with the error "[Error: Network error: JSON Parse error: Unrecognized token '<']" and after log analysis it is a 404 error because the route was not found.
After investigation via the GraphQl Atlair client for chrome by changing the method to GET to make my GrasphQl requests, the error everything works.
my question is how to work the POST method?
I really need to use the METHOD POST for mutations
Thanks everyone
Very cordially
You forgot to add a trailing slash to your GraphQL endpoint URL.
Related issue (solved): https://github.com/overblog/GraphQLBundle/issues/669

Google application marketplace API does not work

We use Google API https://www.googleapis.com/appsmarket/v2/licenseNotification/appId endpoint and it works some time, but for now it returns 503 response with error message
{"error":{"errors":[{"domain":"global","reason":"backendError","message":"Temporary error. Please try later."}],"code":503,"message":"Temporary error. Please try later."}}
Could anyone suggest what it can be and how to fix this problem?

Request header field yammer-capabilities is not allowed by Access-Control-Allow-Headers.

Our API requests have started failing with the error "Request header field yammer-capabilities is not allowed by Access-Control-Allow-Headers".
Before the weekend, everything was working correctly.
Anyone else seeing this?
Same problem here, but it is not the first time, and I think we shouldn't change anything: Yammer's API is slowly beginning to be migrated to Office365's API, maybe this is why there is so much errors in this API... (hope so!)
If you want to see what they're working on :
https://about.yammer.com/success/engage/grow-your-network/release-schedule
Btw, did you try to post this issue on yammer Developer Network ? This can really help, they are using there own social network to communicate ;)

Resources