File tree Expand file tree Collapse file tree 1 file changed +0
-8
lines changed
Expand file tree Collapse file tree 1 file changed +0
-8
lines changed Original file line number Diff line number Diff line change @@ -239,20 +239,12 @@ export const validateAndSanitizeConfig = (config) => {
239239}
240240
241241export const getRegionEndpoint = ( region , service = 'contentManagement' ) => {
242- // Validate input
243- if ( ! region || typeof region !== 'string' ) {
244- throw new Error ( `Invalid region '${ region } ' provided. Allowed regions are: ${ regionHostMap . regions . map ( r => r . id ) . join ( ', ' ) } ` )
245- }
246-
247- // Case-sensitive matching: only match exact case
248242 const regionData = regionHostMap . regions . find ( r =>
249243 r . id === region ||
250244 r . alias . some ( alias => alias === region )
251245 )
252-
253246 if ( ! regionData ) {
254247 throw new Error ( `Invalid region '${ region } ' provided. Allowed regions are: ${ regionHostMap . regions . map ( r => r . id ) . join ( ', ' ) } ` )
255248 }
256-
257249 return regionData . endpoints [ service ] ?. replace ( / ^ h t t p s ? : \/ \/ / , '' )
258250}
You can’t perform that action at this time.
0 commit comments