cancel
Showing results for 
Search instead for 
Did you mean: 

Getting 400 bad request, but the same test case when executed in a different machine runs successful

SOLVED
Occasional Contributor

Getting 400 bad request, but the same test case when executed in a different machine runs successful

Hi,

I am getting 400 bad request. But when the same test case is exported (as xml) and executed in a different machine, it runs successfully !! Its really weird. Please help.

 

harshabongle_0-1599217619973.png

 

 

Thanks,

harsha

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Getting 400 bad request, but the same test case when executed in a different machine runs succes

Hey @harshabongle,

Apologies. I thought id already responded to this.

Youre getting a 400 so it means theres no authentication/authorisation issue, this is a problem with the request itself and typically id look at the payload of your request. However, the fact that the same project works on a different machine complicates the issue.
Have you checked/compared the system properties to check versioning of all the relevant software (readyapi!, java, etc.).

Have you tried exporting the project from the working machine and importing into your readyapi! instance that is failing with the 400?

Either way, when i get problems like this i use Fiddler to proxy and capture the requests/responses for comparison.

So id proxy the request with fiddler via the imnstance generating the 400 and capture the RAW request details.
Id repeat on the machine that is getting a successful request so i could compare the two.
Id suggest there should be a difference when you compare the RAW request details. Identifying the difference could help you work out a fix for the issue.

Ta

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

3 REPLIES 3
Occasional Contributor

Re: Getting 400 bad request, but the same test case when executed in a different machine runs succes

Can you please help me with this weird error ? @HimanshuTayal  @nmrao @msiadak 

 

Thanks,

harsha 

Community Hero

Re: Getting 400 bad request, but the same test case when executed in a different machine runs succes

Hey @harshabongle,

Apologies. I thought id already responded to this.

Youre getting a 400 so it means theres no authentication/authorisation issue, this is a problem with the request itself and typically id look at the payload of your request. However, the fact that the same project works on a different machine complicates the issue.
Have you checked/compared the system properties to check versioning of all the relevant software (readyapi!, java, etc.).

Have you tried exporting the project from the working machine and importing into your readyapi! instance that is failing with the 400?

Either way, when i get problems like this i use Fiddler to proxy and capture the requests/responses for comparison.

So id proxy the request with fiddler via the imnstance generating the 400 and capture the RAW request details.
Id repeat on the machine that is getting a successful request so i could compare the two.
Id suggest there should be a difference when you compare the RAW request details. Identifying the difference could help you work out a fix for the issue.

Ta

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

Occasional Contributor

Re: Getting 400 bad request, but the same test case when executed in a different machine runs succes

Thanks @richie . This is happening because of a header that I didnot populate. The error got resolved after adding a value to the header. 

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors