Giving error on facebook login (omniauth-facebook) - omniauth-facebook

{
"error": {
"message": "Invalid redirect_uri: Can't Load URL",
"type": "OAuthException",
"code": 191,
"fbtrace_id": "DimFAkcyc2F"
}
}

Related

Commercejs PayPal checkout internal error

I am running into an internal error when trying to capture the checkout order with PayPal. When I run commerce.checkout.capture with paypal gateway and relevant details (payerId and paymentid) it throws a 500 internal error with this error message:
{
"message": "Unsuccessful response (500: ) received",
"statusCode": 500,
"statusText": "",
"data": {
"status_code": 500,
"error": {
"message": "There was an internal error. We have been notified.",
"type": "internal_error"
},
"id": "e231f6adc6e3469b95468b770ee2c5b1"
},
"originalError": {
"message": "Request failed with status code 500",
"name": "Error",
"stack": "Error: Request failed with status code 500\n at e.exports (https://www.alchemyremember.me/app-33ce862eff9a0d293497.js:2:27209)\n at e.exports (https://www.alchemyremember.me/app-33ce862eff9a0d293497.js:2:29644)\n at XMLHttpRequest.y (https://www.alchemyremember.me/app-33ce862eff9a0d293497.js:2:22514)",
"config": {
"url": "checkouts/chkt_gvRjwOGzeew4mN",
"method": "post",
"data": "{\"customer\":{\"firstname\":\"Matthew\",\"lastname\":\"Bloemetje\",\"email\":\"mattb007#gmail.com\"},\"payment\":{\"id\":\"gway_9l6LJmxJE8Oyo1\",\"gateway\":\"paypal\",\"paypal\":{\"action\":\"capture\",\"payment_id\":\"0YE34089FH8264019\",\"payer_id\":\"Q29FF5HGE63PG\"}}}",
"headers": {
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json",
"X-Authorization": "pk_47885dbdd0e55e008c1c4982d9e35fb2c99247830bdc9",
"X-Chec-Agent": "commerce.js/v2",
"Chec-Version": "2021-09-29"
},
"params": null,
"baseURL": "https://api.chec.io/v1/",
"transformRequest": [
null
],
"transformResponse": [
null
],
"timeout": 60000,
"xsrfCookieName": "XSRF-TOKEN",
"xsrfHeaderName": "X-XSRF-TOKEN",
"maxContentLength": -1,
"maxBodyLength": -1,
"transitional": {
"silentJSONParsing": true,
"forcedJSONParsing": true,
"clarifyTimeoutError": false
}
}
}
}
I tried to capture the paypal checkout data with commerce.checkout.capture. Expected to return order data with success message and redirect to confirmation page of the order

I'm receiving a validation error when testing the POST request

I'm trying to learn CRUD in MERN but I've come across an error.
I'm trying to test connection to database but it's giving me a validation error. Here's the POST code:
`
POST http://localhost:3001/app/profile
Content-Type: application/json
{
"title":"This is Jay",
"description":"Self learnt full Stack Dev"
}
`
And here's the error I'm getting:
`
{
"errors": {
"description": {
"name": "ValidatorError",
"message": "Path `description` is required.",
"properties": {
"message": "Path `description` is required.",
"type": "required",
"path": "description"
},
"kind": "required",
"path": "description"
},
"title": {
"name": "ValidatorError",
"message": "Path `title` is required.",
"properties": {
"message": "Path `title` is required.",
"type": "required",
"path": "title"
},
"kind": "required",
"path": "title"
}
},
"_message": "crud validation failed",
"name": "ValidationError",
"message": "crud validation failed: description: Path `description` is required., title: Path `title` is required."
}
`
When I check the database the table is their and even on the response it tell me that **HTTP/1.1 200 OK
** so the connection is there but the data is not being sent.
In prior projects I've done the same testing and everything went ok but not sure why it's giving me this error this time.

Getting CORS Error while Integrating FedEx with React Js

While working on FedEx integration with React, we are able to get authorization key using Google extension but unable to work on other APIs. All the APIs are perfectly working in postman but not while integration. Tried checking rates and transit times but getting CORS error. I have included the code and error screenshot.Could you please help?
let body = JSON.stringify({
"accountNumber": {
"value": "XXXXXXXXX"
},
"requestedShipment": {
"shipper": {
"address": {
"postalCode": 75063,
"countryCode": "US"
}
},
"recipient": {
"address": {
"postalCode": "L0J 0A0",
"countryCode": "CA"
}
},
"pickupType": "DROPOFF_AT_FEDEX_LOCATION",
"serviceType": "FEDEX_GROUND",
"rateRequestType": [
"LIST",
"ACCOUNT"
],
"customsClearanceDetail": {
"dutiesPayment": {
"paymentType": "SENDER",
"payor": {
"responsibleParty": null
}
},
"commodities": [{
"description": "Camera",
"quantity": 1,
"quantityUnits": "PCS",
"weight": {
"units": "KG",
"value": 20
},
"customsValue": {
"amount": 100,
"currency": "USD"
}
}]
},
"requestedPackageLineItems": [{
"weight": {
"units": "KG",
"value": 20
}
}]
}
});
axios.post("https://apis-sandbox.fedex.com/rate/v1/rates/quotes", body, {
headers : {
"Accept": "*/*",
"Content-Type": "application/json",
"authorization": `Bearer XXX`,
"Access-Control-Allow-Origin": "*",
}
}).then(res => console.log(res.data));
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>
Cors error cannot be solved from front end , cause its a browser error. so You have to create proxy server to solve this
create an API in backend and send request from server to fedex.

How to download CSV File form api response. (Response I am getting URL)

In the response I am getting below data.
{
"message": null,
"data": {
"fileName": "JUNE-Report",
"uploadedBy": "Vasudha",
"userType": "MANAGER",
"dueDate": "2022-06-30",
"uploadedDate": "2022-04-12T06:09:27.30413",
"quarter": "Q2",
"year": "2022",
"url": "https://vlfreportdocuments.s3.amazonaws.com/JUNE-Report2022-04-12T06%3A09%3A25.797771?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220412T060927Z&X-Amz-SignedHeaders=host&X-Amz-Expires=518399&X-Amz-Credential=AKIA4YA3RZN7I4FHHQ6R%2F20220412%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=7391170c548c4176eed83e645601e20b609d682686091f0d78dbe79bbe2a1e03",
"jobFunction": null
},
"errorMessage": null
}

Invalid response from webhook: Failed to translate JSON to ExecuteHttpResponse

I have a webhook from my google assistant new actions builder platform. Webhook code is written in the dotnet vs2019. I have followed the webhook request and response format and sample jsons provided in the below links.
https://developers.google.com/assistant/conversational/reference/rest/v1/TopLevel/fulfill#User
https://developers.google.com/assistant/conversational/webhooks#request-json_1
But when I test assistant action, it is failing. Below is request and response json from logs in the google assistant test simulator.Error message just says"Invalid response from webhook: Failed to translate JSON to ExecuteHttpResponse." I don't know why it is not valid. Can someone help me resolving this.
{
"requestJson": {
"handler": {
"name": "agentcube"
},
"intent": {
"name": "",
"params": {
"phone": {
"original": "1234562869",
"resolved": 1234562869
}
},
"query": "1234562869"
},
"scene": {
"name": "Start",
"slotFillingStatus": "FINAL",
"slots": {
"Zip": {
"mode": "REQUIRED",
"status": "SLOT_UNSPECIFIED",
"updated": false,
"value": 37122
},
"Phone": {
"mode": "REQUIRED",
"status": "SLOT_UNSPECIFIED",
"updated": true,
"value": 1234562869
},
"FName": {
"mode": "REQUIRED",
"status": "SLOT_UNSPECIFIED",
"updated": false,
"value": "john doe"
}
},
"next": {
"name": "actions.scene.END_CONVERSATION"
}
},
"session": {
"id": "ABwppHFkFuGBF-UawPmIkxWpkfM1Hb5An7h8KnjR302zukmBoKA1NqDp7DfePGzYsyxT5oy--wg5Jkjj",
"params": {
"Phone": 1234562869,
"FName": "john doe",
"Zip": 37122
},
"typeOverrides": [],
"languageCode": ""
},
"user": {
"locale": "en-US",
"params": {},
"accountLinkingStatus": "NOT_LINKED",
"verificationStatus": "VERIFIED",
"packageEntitlements": [],
"gaiamint": "",
"permissions": [],
"lastSeenTime": "2021-01-28T19:21:28Z"
},
"home": {
"params": {}
},
"device": {
"capabilities": [
"SPEECH",
"RICH_RESPONSE",
"LONG_FORM_AUDIO"
]
}
}
}
Invalid response from webhook: Failed to translate JSON to ExecuteHttpResponse..
{
"responseJson": {
"Session": {
"Id": "ABwppHFkFuGBF-UawPmIkxWpkfM1Hb5An7h8KnjR302zukmBoKA1NqDp7DfePGzYsyxT5oy--wg5Jkjj",
"Params": {
"Phone": 1234562869,
"Zip": 37122,
"FName": "john doe"
}
},
"Prompt": {
"Override": false,
"FirstSimple": {
"Speech": "My webhook response",
"Text": "My response from webhook"
}
},
"Scene": {
"Name": "Start",
"SlotFillingStatus": "FINAL",
"Slots": {
"Phone": {
"Mode": "REQUIRED",
"Status": "SLOT_UNSPECIFIED",
"Updated": true,
"value": 1234562869
},
"FName": {
"Mode": "REQUIRED",
"Status": "SLOT_UNSPECIFIED",
"Updated": false,
"value": "john doe"
},
"Zip": {
"Mode": "REQUIRED",
"Status": "SLOT_UNSPECIFIED",
"Updated": false,
"value": 37122
}
},
"Next": {
"Name": "actions.scene.END_CONVERSATION"
}
}
}
}
Make sure the response that you code is returning is json by checking with a linter, which this seems to checks (i.e. everything inside the ResponseJson {}
Please see my response to a similar issue at https://stackoverflow.com/a/66512370/10537202 to use the webhook playground.

Resources