Skip to content

Add error to client API when http status >= 400#11

Open
oberg-s wants to merge 1 commit intozaproxy:masterfrom
deepfactor-io:1-add-error-on-status
Open

Add error to client API when http status >= 400#11
oberg-s wants to merge 1 commit intozaproxy:masterfrom
deepfactor-io:1-add-error-on-status

Conversation

@oberg-s
Copy link
Copy Markdown

@oberg-s oberg-s commented Dec 7, 2020

Fixes deepfactor-io#1

TBD - Add go.mod and bump version to 0.1 due to change in go client API that returns more error(s)?

Test result with zap API endpoint that responds with 400:

Dec 04 17:48:36 xxx-portal.deepfactor.io webappsvc[57791]: time="2020-12-04T17:48:36Z" level=error msg="WebAppScan zap Active scan userID: , API http status: 400, response: map[code:url_not_found message:URL Not Found in the Scan Tree]"

before fix

Dec 04 17:27:07 xxx-portal.deepfactor.io webappsvc[50652]: time="2020-12-04T17:27:07Z" level=info msg="WebAppScan zap Active scan userID: , r: map[code:url_not_found message:URL Not Found in the Scan Tree], err: <nil>"

@kingthorin
Copy link
Copy Markdown
Member

@oberg-s oberg-s force-pushed the 1-add-error-on-status branch from f1f4c51 to 9bc50fe Compare December 7, 2020 19:19
@thc202
Copy link
Copy Markdown
Member

thc202 commented Dec 8, 2020

The Fixes #1 should be removed from the commit message.

@oberg-s
Copy link
Copy Markdown
Author

oberg-s commented Dec 15, 2020

The Fixes #1 should be removed from the commit message.

@thc202
Sorry, I forgot to fully qualify the original short issue/pull refs in the original commit.

Is Fixes deepfactor-io#1 appropriate?
Fixes deepfactor-io/zap-api-go#1

Or is there a policy to scrub 3rd party issue references?

Thanks!

Fixes #1

Signed-off-by: Scott Oberg <scott@deepfactor.io>
@oberg-s oberg-s force-pushed the 1-add-error-on-status branch from 9bc50fe to e673c8b Compare December 15, 2020 22:05
@thc202
Copy link
Copy Markdown
Member

thc202 commented Apr 29, 2022

Adding references to other repos is fine.

@1azunna
Copy link
Copy Markdown
Contributor

1azunna commented May 8, 2022

Wouldn't this affect the client implementation for other users? You don't want to make a change to suit your use case alone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

go client API does not return error when http response status code is >= 400

4 participants