SAP Knowledge Base Article - Preview

3630121 - 403 issue thrown by CAPM application for a POST request: "CSRF token validation failed"

Symptom

When trying to modify, save or update fields in a custom application created with SAP Cloud Application Programming Model, the application throws an error message for a POST request.

The applications logs show:
[APP/PROC/WEB/0] STDERR response: {
[APP/PROC/WEB/0] STDERR status: 403,
[APP/PROC/WEB/0] STDERR statusText: 'Forbidden',
[APP/PROC/WEB/0] STDERR headers: Object [AxiosHeaders] {
[APP/PROC/WEB/0] STDERR 'set-cookie': [
...
[APP/PROC/WEB/0] STDERR 'x-csrf-token': 'Required',
...
[APP/PROC/WEB/0] STDERR body: 'CSRF token validation failed'
...
[APP/PROC/WEB/0] STDERR level: 'ERROR',


    Read more...

    Environment

    • SAP CAP – node.js runtime
    • Managed Approuter is being used

    Keywords

    502 error, connection expired error, invalid character, header content, SAP Build Work Zone, node.js runtime, modify, save, update, dependent field, error code 502 , KBA , BC-XS-CDX-NJS , SAP CAP – node.js runtime , Problem

    About this page

    This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

    Search for additional results

    Visit SAP Support Portal's SAP Notes and KBA Search.