Skip to content

error code 400 returned for two different purpose #15

@ambirag

Description

@ambirag

Error code 400 is returned if the required parameters are not passed in
But as per this code
log.info(String.format("Legacy server request received. Browser [%s]", browserRequested)); AutomationRunContext context = AutomationContext.getContext(); // If a run is already going on with this browser, return an error code if(context.hasRun(browserRequested)) { response.setStatus(400); return; }
400 is returned if a hub is requested for new nodes with a browser x, but if the hub already got a request with same browser and running, it returns 400.

Also if the hub gets a request with same UUID its already running, it returns 400

This is confusing and difficult as in jenkins we exit the job if we get 400 (if parameter missing). But the second 400 and third ones are not bad in the sense you still have hub and nodes and automation can run.
Hence we need to return different codes in these circumstances

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions