cap-js / audit-logging

CDS plugin providing integration to the SAP Audit Log service as well as out-of-the-box personal data-related audit logging based on annotations.
https://cap.cloud.sap/docs/guides/data-privacy
Apache License 2.0
4 stars 1 forks source link

audit-logging/srv/log2restv2.js does return undefined in case of success #74

Closed soccermax closed 6 days ago

soccermax commented 6 months ago
    try {
      await _post(url, data, { headers })
    } catch (err) {
      LOG._trace && LOG.trace('error during log send:', err)
      // 429 (rate limit) is not unrecoverable
      if (String(err.response?.statusCode).match(/^4\d\d$/) && err.response?.statusCode !== 429)
        err.unrecoverable = true
      throw err
    }

--> _send does not return anything. However, the _post function returns the body in case of a successful request. Would it be possible to return this to the caller?

sjvans commented 5 months ago

hi @soccermax

why do you need the result? the log event has no return type, hence there is no return value...

best, sebastian

oklemenz2 commented 3 weeks ago

Still an issue?

sjvans commented 6 days ago

Still an issue?

@soccermax? ;)

soccermax commented 6 days ago

I'm fine without it, my intention was: that the REST API of the audit-log service returns an ID and some more info in the return structure of the create request, might be useful to have this information

sjvans commented 6 days ago

i'll keep in mind for the next iteration