I'm new to the WorldPay integration development.
I'm having difficulty when I am sending an authorization request from one of our applications and I got this response from the api .
Client error: POST https://try.access.worldpay.com/payments/authorizations resulted in a 400 Bad Request response: {"errorName":"bodyDoesNotMatchSchema","message":"The json body provided does not match the expected schema","validationE (truncated...)
My problem is I was unable to see the complete error message because the response has been truncated. Is there a way to prevent that issue?
Related
I’m not able to access the error body in my spring integration error handling flow
Message received from external system
Status: 400 Bad Request
Response body:
{
“title”: “record already exists”, “errorCode”: -1
}
Tried to access the response body but unable to do so
msg.getPayload().getCause(), (MesaagingException)msg.getPayload().getRootCause() doesn’t work either. Only able to retrieve the status.
Need help in sending a request which is for WCF service. The service has Custom Binding ( The request is Binary encoded).
Initially i was getting the HTTP/1.1 415 Cannot process the message because the content type 'application/soap+xml;charset=UTF-8;action="Phase"' was not the expected type 'application/soap+msbin1+gzip'.
So I manually added a header Content-Type = 'application/soap+msbin1+gzip'. Now the previous error was gone. but now I am getting the following error: "The remote server returned an error: (400) Bad Request"
I am using HttpWebRequest.
Below images for the reference
Code image
Error line Where i got 400
When try to create issue in Jira using the JMeter API with POST method, it does not allow to create issue and it shows error below.
I uploaded my all configuration image.
Can anybody correct me?
Thanks in advance.
Error message:
2020-12-27 19:48:35,841 ERROR o.a.j.p.h.s.HTTPJavaImpl: readResponse: java.io.IOException: Server
returned HTTP response code: 400 for URL: https://learntestapi.atlassian.net/rest/api/2/issue
2020-12-27 19:48:35,841 ERROR o.a.j.p.h.s.HTTPJavaImpl: Cause: java.io.IOException: Server returned
HTTP response code: 400 for URL: https://learntestapi.atlassian.net/rest/api/2/issue
Screenshots (2 images attached)
I think you're using an incorrect URL, i.e. it has to be:
/rest/api/2/issue/createmeta/QA/issuetypes/{issueTypeId}
to identify the issueTypeId you need to first execute call to the following endpoint:
/rest/api/2/issue/createmeta/QA/issuetypes
then choose an appropriate issue type and substitute it in the first request.
More information: Jira REST API examples
Also make sure that your HTTP Header Manager is configured to send Content-Type header with the value of application/json
This is an internal server error so it seems to be an issue on Pinterest's side. I've tried a few things but these accounts always seem to have the internal error.
Here's an example URL that caused the problem:
URL: https://api.pinterest.com/v1/boards/533324849561780294/pins?access_token=AX1gRVqQ2O-VNVVlWy1wAkz3JDvAFDeLJQ7Eom1C53m7hgAuWgAAAAA&fields=url,creator,created_at,counts,image,color,media,attribution,note,link
Exception Error: HTTP request failed! HTTP/1.1 500 INTERNAL SERVER ERROR
Response:
{"message": "A InstantContentBlockField was passed an unknown block_type: text", "type": "api"}
Remove "link" from the fields you will get normal response.
I am working in an API . I want to throw detailed error messages to the user. Now i am in a situation to decide what kind of error code should be sent or how to explain user if any error occurs in the application internally. For example if database connection fails , what kind of http status code i want to send to the user ?
Can anyone help ?
An HTTP status code generally refers to the status of the HTTP request itself, not the status of the application handling the request. Therefore, most server-side errors are covered by 500 Internal Server Error. Any additional info about the error should be described in the response body. For APIs, the response body will often be JSON or XML, so you can use those formats for your errors. Something like this:
HTTP/1.1 500 Internal Server Error
[headers]
{"status":"error", "message":"The request failed due to database connectivity."}
There are, however, two cases I can think of when you might want another status code. If the user has requested an API method that is not implemented, you might want a 501 Not Implemented, and when there is a temporary service outage, you can use 503 Service Unavailable.
More info about server-side status codes here.