zap-api-go icon indicating copy to clipboard operation
zap-api-go copied to clipboard

Add error to client API when http status >= 400

Open oberg-s opened this issue 4 years ago • 5 comments

Fixes deepfactor-io/zap-api-go#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>"

oberg-s avatar Dec 07 '20 19:12 oberg-s

To address the DCO requirement you'll need to sign-off the commit(s):

  • https://github.com/zaproxy/zaproxy/blob/develop/CONTRIBUTING.md#developer-certificate-of-origin
  • https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff

kingthorin avatar Dec 07 '20 19:12 kingthorin

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

thc202 avatar Dec 08 '20 09:12 thc202

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/zap-api-go#1 appropriate?
Fixes deepfactor-io/zap-api-go#1

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

Thanks!

oberg-s avatar Dec 15 '20 22:12 oberg-s

Adding references to other repos is fine.

thc202 avatar Apr 29 '22 09:04 thc202

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

1azunna avatar May 08 '22 17:05 1azunna