beckn / protocol-server

protocol-server
3 stars 1 forks source link

Error message to be sent when BPP response fails validation tests #109

Open vbabuEM opened 3 months ago

vbabuEM commented 3 months ago

Currently when a BPP sends a wrongly formatted response, it is shown as an error and not sent into the Beckn network. This is fine. However the BAP which sent the request does not get any response back and it times out. Ideally the protocol specifies that if the BPP faces any error, it should send back an error response. I am not sure if this is the case even when the error is something introduced by the BPP itself. If indeed error needs to be sent, the protocol server has to be changed to make this happen.

Ways to reproduce:

  1. In any local BPP, compose a response (e.g. on_select) which fails validation.
  2. BAP should get an error response
  3. Instead BAP is timing out.

Please work on this issue only after @faizmagic has approved this issue.

vbabuEM commented 1 month ago

Venkatesh Prepare and discuss with Faiz on the approval.

vbabuEM commented 3 weeks ago

@faizmagic , I thought about this.

Due to the above, I think we should not propagate this error back to BAP. We already inform the BPP and the BPP has to fix its code. The BAP timing out repeatedly is a reasonable indication that the BAP can use to take the issue up with the BPP (for non search requests)

So I recommend that we do nothing on this. Please think about it and advise. Based on your advise, I will proceed further.

vbabuEM commented 2 weeks ago

Spoke to Ravi on this. He said we should send the error. Please revisit this issue.