CoderDojo / community-platform

Zen, the CoderDojo Community Platform!
https://zen.coderdojo.com
MIT License
120 stars 55 forks source link

Salesforce errors.. #618

Closed dberesford closed 9 years ago

dberesford commented 9 years ago
Details: { id: 'q0377e06szyg/jnszump1kzgx',
  gate: false,
  ungate: true,
  desc: 'cmd:save,role:entity',
  plugin: { name: 'salesforce-store', tag: 'GBP' },
  time: { start: 1441966395470, end: 1441966396569 },
  'orig$':
   { name: 'INVALID_FIELD_FOR_INSERT_UPDATE',
     errorCode: 'INVALID_FIELD_FOR_INSERT_UPDATE',
     fields: [ 'Name' ] },
  'message$': 'Unable to create/update fields: Name. Please check the security settings of this field and verify that it is read/write for your profile or permission set.',
  message: 'Unable to create/update fields: Name. Please check the security settings of this field and verify that it is read/write for your profile or permission set.',
  pattern: 'cmd:save,role:entity',
  instance: 'Seneca/0.6.4/qaqse2aaqkjj/1441795181396/7330/-' }

Stack:
    at Object.handle_response (/opt/zen/cp-dojos-service/node_modules/seneca/node_modules/seneca-transport/lib/transport-utils.js:86:15)
    at /opt/zen/cp-dojos-service/node_modules/seneca/node_modules/seneca-transport/transport.js:569:16
    at done (/opt/zen/cp-dojos-service/node_modules/seneca/node_modules/seneca-transport/node_modules/needle/lib/needle.js:355:7)
    at PassThrough.<anonymous> (/opt/zen/cp-dojos-service/node_modules/seneca/node_modules/seneca-transport/node_modules/needle/lib/needle.js:523:9)
    at PassThrough.emit (events.js:117:20)
    at _stream_readable.js:944:16
    at process._tickCallback (node.js:448:13)```

and this one:

Message: seneca: Action cmd:save,role:entity failed: Required fields are missing: [LastName, Company].

Code: act_execute

Details: { id: 'zvfb9tqn8xow/te3xwcq077m6',
  gate: false,
  ungate: true,
  desc: 'cmd:save,role:entity',
  plugin: { name: 'salesforce-store', tag: 'GBP' },
  time: { start: 1441966803025, end: 1441966804093 },
  'orig$':
   { name: 'REQUIRED_FIELD_MISSING',
     errorCode: 'REQUIRED_FIELD_MISSING',
     fields: [ 'LastName', 'Company' ] },
  'message$': 'Required fields are missing: [LastName, Company]',
  message: 'Required fields are missing: [LastName, Company]',
  pattern: 'cmd:save,role:entity',
  instance: 'Seneca/0.6.4/qaqse2aaqkjj/1441795181396/7330/-' }

Stack:
    at Object.handle_response (/opt/zen/cp-dojos-service/node_modules/seneca/node_modules/seneca-transport/lib/transport-utils.js:86:15)
    at /opt/zen/cp-dojos-service/node_modules/seneca/node_modules/seneca-transport/transport.js:569:16
    at done (/opt/zen/cp-dojos-service/node_modules/seneca/node_modules/seneca-transport/node_modules/needle/lib/needle.js:355:7)
    at PassThrough.<anonymous> (/opt/zen/cp-dojos-service/node_modules/seneca/node_modules/seneca-transport/node_modules/needle/lib/needle.js:523:9)
    at PassThrough.emit (events.js:117:20)
    at _stream_readable.js:944:16
    at process._tickCallback (node.js:448:13)
dberesford commented 9 years ago

Third one from today:

Message: seneca: Action cmd:save,role:entity failed: Background check comment: data value too large: In questo momento, ho progettato un corso per la quinta elementare, intitolato Coerdojo Messina, ne ho creato il logo e verrò aiutato da mia moglie nelle lezioni, che si t
erranno presso l&#39;istituto dove insegno. Ho diffuso la voce a tutti quelli che conosco e ai genitori che frequentano l&#39;istituto. (max length=255).

Code: act_execute

Details: { id: 'z3pwk58wj89y/r6s7g6t25g5i',
  gate: false,
  ungate: true,
  desc: 'cmd:save,role:entity',
  plugin: { name: 'salesforce-store', tag: 'GBP' },
  time: { start: 1441987286351, end: 1441987288253 },
  'orig$':
   { name: 'STRING_TOO_LONG',
     errorCode: 'STRING_TOO_LONG',
     fields: [ 'BackgroundCheckComment__c' ] },
  'message$': 'Background check comment: data value too large: In questo momento, ho progettato un corso per la quinta elementare, intitolato Coerdojo Messina, ne ho creato il logo e verrò aiutato da mia moglie nelle lezioni, che si terranno presso l&#39;istituto dove ins
egno. Ho diffuso la voce a tutti quelli che conosco e ai genitori che frequentano l&#39;istituto. (max length=255)',
  message: 'Background check comment: data value too large: In questo momento, ho progettato un corso per la quinta elementare, intitolato Coerdojo Messina, ne ho creato il logo e verrò aiutato da mia moglie nelle lezioni, che si terranno presso l&#39;istituto dove insegn
o. Ho diffuso la voce a tutti quelli che conosco e ai genitori che frequentano l&#39;istituto. (max length=255)',
  pattern: 'cmd:save,role:entity',
  instance: 'Seneca/0.6.4/qaqse2aaqkjj/1441795181396/7330/-' }

Stack:
    at Object.handle_response (/opt/zen/cp-dojos-service/node_modules/seneca/node_modules/seneca-transport/lib/transport-utils.js:86:15)
    at /opt/zen/cp-dojos-service/node_modules/seneca/node_modules/seneca-transport/transport.js:569:16
    at done (/opt/zen/cp-dojos-service/node_modules/seneca/node_modules/seneca-transport/node_modules/needle/lib/needle.js:355:7)
    at PassThrough.<anonymous> (/opt/zen/cp-dojos-service/node_modules/seneca/node_modules/seneca-transport/node_modules/needle/lib/needle.js:523:9)
    at PassThrough.emit (events.js:117:20)
    at _stream_readable.js:944:16
    at process._tickCallback (node.js:448:13)
tangentfairy-zz commented 9 years ago

A champion is trying to edit the time field on her listing but can't edit it, I presume this is Salesforce related too.

Do you want me to go through all of the fields and make them larger?

daveymoran2 commented 9 years ago

the salesforce background check is limited to 255 charachters whereas the platform is not. @tangentfairy If you want to come up with an appropriate text length and update the salesforce side of all those comment fields, i can update the validation on the rules to match on the front end and in the dojo/user services.

daveymoran2 commented 9 years ago

the time field is somewhat independent of salesforce, if the value is over 255 chars the platform should still save to pg but will break on salesforce side. if the user cannot save via the platform, the issue should lye outside of salesforce.

tangentfairy-zz commented 9 years ago

I'm going to do max length 131,072, it's the max for a long text area in Salesforce.

tangentfairy-zz commented 9 years ago

I've changed all the fields that could be lengthy to be a long text area now.

daveymoran2 commented 9 years ago

fyi, i have seen the "INVALID_FIELD_FOR_INSERT_UPDATE" issue before on fields without the correct field accessibility values set. its not the cause of this particular issue, but worth being aware of for any future issues that may rise.

daveymoran2 commented 9 years ago

there was an issue with the the user/dojo ids being mixed up on delete/verify. the INVALID_FIELD_FOR_INSERT_UPDATE error most likely was caused due to trying to save a value in the wrong object. this has now been fixed.

daveymoran2 commented 9 years ago

the REQUIRED_FIELD_MISSING error was most likely caused by the same id issue mentioned above, trying to save a new object without the mandatory fields instead of updating and objects specific fields. this is also fixed now.

daveymoran2 commented 9 years ago

will update the issues labels when the fix has been deployed to production server.