• Andrey Maksimov
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 2
    Replies
hi there,

i am developing some code to cover missed pieces of official Zendesk-SFDC integration. so i decided to use an open-source lib to utilize the Zendesk API, it's available as a managed package.

in the debug logs (all set to FINEST) i am getting the following exception related to HTTP callouts sent by the package:
09:42:07.0 (993475801)|METHOD_EXIT|[138]|01p160000058u69|zdapiv1.ZendeskOrganizationsAPI.createOrganization(zdapiv1.ZendeskTypes.ZOrganization)
09:42:07.0 (993491523)|EXCEPTION_THROWN|[147]|zdapiv1.ZendeskResponseException: Zendesk API Error (422, Unprocessable Entity) ERR=RecordInvalid Record validation errors
09:42:07.0 (993498031)|METHOD_EXIT|[117]|01p160000058u6k|ZdSync.createOrg(Account)
09:42:07.0 (993503252)|SYSTEM_MODE_EXIT|false
09:42:07.0 (993511753)|EXCEPTION_THROWN|[119]|zdapiv1.ZendeskResponseException: Zendesk API Error (422, Unprocessable Entity) ERR=RecordInvalid Record validation errors
09:42:07.0 (993774067)|FATAL_ERROR|zdapiv1.ZendeskResponseException: Zendesk API Error (422, Unprocessable Entity) ERR=RecordInvalid Record validation errors
Class.zdapiv1.ZendeskConnection.sendRequest: line 171, column 1
Class.zdapiv1.ZendeskOrganizationsAPI.createOrganization: line 97, column 1
sadly, the lib does not give error details in the exception just because it does not store 'details' structure.

i know, i can't see System.debug() output in installed managed package. but is it possible to check contents of the callout requests and responses?

if not, do you know other ways to work this out?
hi there,

i am developing some code to cover missed pieces of official Zendesk-SFDC integration. so i decided to use an open-source lib to utilize the Zendesk API, it's available as a managed package.

in the debug logs (all set to FINEST) i am getting the following exception related to HTTP callouts sent by the package:
09:42:07.0 (993475801)|METHOD_EXIT|[138]|01p160000058u69|zdapiv1.ZendeskOrganizationsAPI.createOrganization(zdapiv1.ZendeskTypes.ZOrganization)
09:42:07.0 (993491523)|EXCEPTION_THROWN|[147]|zdapiv1.ZendeskResponseException: Zendesk API Error (422, Unprocessable Entity) ERR=RecordInvalid Record validation errors
09:42:07.0 (993498031)|METHOD_EXIT|[117]|01p160000058u6k|ZdSync.createOrg(Account)
09:42:07.0 (993503252)|SYSTEM_MODE_EXIT|false
09:42:07.0 (993511753)|EXCEPTION_THROWN|[119]|zdapiv1.ZendeskResponseException: Zendesk API Error (422, Unprocessable Entity) ERR=RecordInvalid Record validation errors
09:42:07.0 (993774067)|FATAL_ERROR|zdapiv1.ZendeskResponseException: Zendesk API Error (422, Unprocessable Entity) ERR=RecordInvalid Record validation errors
Class.zdapiv1.ZendeskConnection.sendRequest: line 171, column 1
Class.zdapiv1.ZendeskOrganizationsAPI.createOrganization: line 97, column 1
sadly, the lib does not give error details in the exception just because it does not store 'details' structure.

i know, i can't see System.debug() output in installed managed package. but is it possible to check contents of the callout requests and responses?

if not, do you know other ways to work this out?

Hi

 

I am using the new Type methods to dynamically load a class, that implements an interface.  With the aim to make the code robust, i would like to check that the class implements the interface before instantiation / casting.

 

I would like the the keyword 'instanceof' to verify a class implements an interface, as i understand it, it only verifies class type.

 

Does anyone know a good way to verifying a class implements an interface?

 

I can always try/catch around a cast, but I think this is a workaround.

 

Thanks in advance.

Matthew

 

I know that sandboxes are now generated with "System Email Only" setting for Email Deliverability. However, this immediately breaks a whole bunch of unit tests.

Has anybody found a workaround for this, other than just changing "Email Deliverability" straight back to "All"? Seems like a bit of an oversight by Salesforce here not to excempt test code from those settings.