Power Automate flow throwing the 400 error - power-automate

I have created a flow to save the attachment to to the file system from email, and have added two conditions in between to convert the xlsx file to csv and also there is on column with date format has to change in ddmmyy.
I'm getting an http 400 error:
status": 400,
"message": "The argument is invalid or missing or has an incorrect format."
clientRequestId: 8e871146-9057-4011-919c-c7b46ccc54eb
serviceRequestId: 8dee9274-904a-4a89-85f8-dbc067c4c72c;d56eda10- ce4e-45ab-9441-59af851da3d7
"source": "excelonline-scus.azconn-scus-001.p.azurewebsites.net"

Related

Issue uploading files using Graphql / Altair Client

I'm using the Altair Client to test some file uploads via Graphql. If I write out my query, and leave the variables blank, I get back an error response
Mutation:
mutation UploadCSV($fileData: Upload!) {
uploadCsv(fileData: $fileData) {
message
errors
successCount
}
}
Errors:
"message": "In argument \"fileData\": Expected type \"Upload!\", found null."
"message": "Variable \"fileData\": Expected non-null, found null."
This is exactly what I'd expect, because I haven't attached a file yet. So I follow the Altair instructions and pick a file, and give it the name fileData. Now when I click Send Request, I get the error "message": "No query document supplied", which is the error you get when no query/mutation has been sent. What am I doing wrong here?

generic return type for restemplate.exchange

I am using resttemplate.exchange to invoke a URL and get response. But the issue is the response type varies when I successfully receives the output and if I get some error.
eg.
ResponseEntity<XXX[]> response = restTemplate.exchange(endPoint,HttpMethod.GET,req,
new ParameterizedTypeReference<XXX[]>() {},uriVariables);
If there is no issue with service and then output is in format of list. but if there is error like "NO DATA FOUND" then the response is in MAP. so whenever I have any issue with URL i get "404: null error" because my response type is unable to identify the error which is in MAP.
Could you please suggest what could be done as i can not change the response type of services.
Edit:: http://localhost:9090/data/getDetail?name=XXX
response [{"name":"XXX","Dept":"teaching","createdby":"YYY","createdDt":"06/09/2018"}]
when data not found case::http://localhost:9090/data/getDetail?name=YYY
response
{"response":"DATA NOT FOUND"}

GraphQL with status code is correct solution? [duplicate]

This question already has answers here:
GraphQL - How to respond with different status code?
(5 answers)
Closed 3 years ago.
Previous When I made API server with RestAPI, I return data with HTTP status code.
So, Frontend receive status code from server, it determined request is success of fail.
I know that graphQL has error fields, and can refer it to solve this issue.
But I want to change response status code that send to client.
This way is correct and stable way?
Or, When use graphQL, do not change status code and just determine by error field is standard way?
Any suggestions would be appreciated :)
Thanks.
[...] do not change status code and just determine by error field is standard way?
YES do not manage errors using status codes, they are Http related and GraphQL aim at being protocol/framework agnostic so that everything you need should be inside your output.
As you said there can be an errors field in your response:
The errors entry in the response is a non‐empty list of errors, where each error is a map.
If no errors were encountered during the requested operation, the errors entry should not be present in the result.
The spec states that errors field entries can have a field named extensions:
GraphQL services may provide an additional entry to errors with key extensions. This entry, if set, must have a map as its value. This entry is reserved for implementors to add additional information to errors however they see fit, and there are no additional restrictions on its contents.
Using the extensions field you can add custom machine-readable information to your errors like the key code here.
{
"errors": [
{
"message": "Name for character with ID 1002 could not be fetched.",
"locations": [ { "line": 6, "column": 7 } ],
"path": [ "hero", "heroFriends", 1, "name" ],
"extensions": {
"code": "CAN_NOT_FETCH_BY_ID",
"timestamp": "Fri Feb 9 14:33:09 UTC 2018"
}
}
]
}
Apollo Prophecy
To make error management easier I created a codegen CLI that generate throwable errors classes for the server and facilitate error handling for client.
https://github.com/theGlenn/apollo-prophecy

API reply with multiple card errors

Using the sandbox, if I generate multiple errors, like using 911 for the CVV and 01/40 for the date, and 99999 for the zip code, the reply has only one error in it. With all three of those error generating values, it returns only "Postal code check failed." Is there some way to get all errors back in a single post? What is the point of the JSON errors object being an array if only one error is included?

Spring Roo Error: "The request sent by the client was syntactically incorrect ()"

I'm trying out Spring Roo to generate CRUD operations for all of the tables in my database.
I get the following error:
HTTP Status 400 -
description The request sent by the client was syntactically incorrect ().
Using Firebug, I can see that the URL generated is as follows:
_users=1&mydb=4&_mydb=1&userId=2&jpost=testing&abuseCount=1&lastUpdatedTs=Aug+26%2C+2012
What does the error mean?
I got that same error and this is what caused it
I had one of the table names as jpost and also had a column with the same name=jpost. So when I sent jpost=testing (which is string) it tries to convert it to the jpost entity type, which produces an ArgumantTypeMismatch error. I changed the name of the column to be unique and it works correctly now.

Resources