Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Plat-Arch-204 Exam - Topic 4 Question 13 Discussion

What is the first thing an integration architect should validate if a callout from a Lightning web component (LWC) to an external endpoint is failing?
C) The endpoint URL has been added to Content Security Policies (CSP).
A) The endpoint domain has been added to Cross-Origin Resource Sharing (CORS).
B) The endpoint URL has been added to Remote Site Settings.

Salesforce Plat-Arch-204 Exam - Topic 4 Question 13 Discussion

Actual exam question for Salesforce's Plat-Arch-204 exam
Question #: 13
Topic #: 4
[All Plat-Arch-204 Questions]

What is the first thing an integration architect should validate if a callout from a Lightning web component (LWC) to an external endpoint is failing?

Show Suggested Answer Hide Answer
Suggested Answer: C

When an integration initiated from the client-side (the browser) fails, the architect must first look at the browser's security policies. In Salesforce, Lightning Web Components are subject to the Lightning Component framework's Content Security Policy (CSP).

CSP is a security layer that prevents cross-site scripting (XSS) and other code injection attacks by restricting which domains the browser is allowed to communicate with. If an LWC attempts to make a fetch() call to an external REST endpoint, the browser will block the request unless that specific domain is whitelisted in CSP Trusted Sites.

Option B (Remote Site Settings) is a common distractor; these settings are strictly for server-side Apex callouts and have no effect on client-side JavaScript requests. Option A (CORS) is also a browser security mechanism, but it must be configured on the external server to allow Salesforce to access its resources. While CORS is necessary, the first thing to validate within the Salesforce environment for a failing LWC callout is the CSP Trusted Site entry. Without this whitelisting, the request will be terminated by the browser before it even leaves the client, regardless of how the external server is configured.


Contribute your Thoughts:

0/2000 characters
Bo
13 days ago
I feel C is important too, but CORS is the first check for me.
upvoted 0 times
...
Annmarie
18 days ago
I lean towards B. Remote Site Settings are often overlooked.
upvoted 0 times
...
Millie
23 days ago
I think it’s definitely A. CORS is crucial for external calls.
upvoted 0 times
...
Gearldine
29 days ago
Really? I thought it was the URL that mattered most.
upvoted 0 times
...
Gussie
1 month ago
I always start with CORS, seems like the obvious choice.
upvoted 0 times
...
Hubert
1 month ago
Wait, isn't CSP also crucial?
upvoted 0 times
...
Chuck
1 month ago
I think Remote Site Settings is more important.
upvoted 0 times
...
Melodie
2 months ago
Definitely check CORS first!
upvoted 0 times
...
Lynna
2 months ago
I definitely remember that CORS is crucial for external calls, so I would lean towards that being the right answer.
upvoted 0 times
...
Annita
2 months ago
I feel like CSP might be important too, but I can't recall if it's the first step or not.
upvoted 0 times
...
Solange
2 months ago
I remember practicing a question about Remote Site Settings, so maybe that's the first thing to validate?
upvoted 0 times
...
Louann
2 months ago
I think the first thing to check would be if the endpoint domain is in the CORS settings, but I'm not entirely sure.
upvoted 0 times
...

Save Cancel