Syntax error Invalid Regular expression angular typescript

mariafatima

i am getting this error and i am stuck cant find where is the syntax problem

core.mjs:6495 ERROR SyntaxError: Invalid regular expression: /https://graph.microsoft.com/v1.0/communications/callRecords/getPstnCalls(fromDateTime=2020-01-30,toDateTime=2020-01-30/: Unterminated group at new RegExp () at Function.StringUtils.matchPattern (StringUtils.js:122) at azure-msal-angular.js:425 at Array.forEach () at MsalInterceptor.matchResourcesToEndpoint (azure-msal-angular.js:422) at MsalInterceptor.getScopesForEndpoint (azure-msal-angular.js:404) at MsalInterceptor.intercept (azure-msal-angular.js:336) at HttpInterceptorHandler.handle (http.mjs:1415) at HttpXsrfInterceptor.intercept (http.mjs:2018) at HttpInterceptorHandler.handle (http.mjs:1415)

export function MSALInterceptorConfigFactory(): MsalInterceptorConfiguration {
  
 var fromDatetimeVariable ='2020-01-30';
 var toDatetimeVariable='2020-01-30';

  let queryUrl = `https://graph.microsoft.com/v1.0/communications/callRecords/getPstnCalls(fromDateTime=${fromDatetimeVariable},toDateTime=${toDatetimeVariable}`

  const protectedResourceMap = new Map<string, Array<string>>();
  protectedResourceMap.set(queryUrl, ['CallRecords.Read.All', 'CallRecord-PstnCalls.Read.All']);
  
 // protectedResourceMap.set('https://graph.microsoft.com/v1.0/me', ['CallRecord-PstnCalls.Read.All', 'mail.read']);
 // protectedResourceMap.set('http://localhost:8080/hello', ['api://d16e1a06-3be2-4ae1-8bd4-718c19cecac3/hello']);

  return {
    interactionType: InteractionType.Popup,
    protectedResourceMap
  };
}
João Vitor Amorim

You have missed to close the parentheses in the queryUrl value. To correct this, your queryUrl value must be like:

let queryUrl = `https://graph.microsoft.com/v1.0/communications/callRecords/getPstnCalls(fromDateTime=${fromDatetimeVariable},toDateTime=${toDatetimeVariable})`

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

grep: Invalid regular expression

Angular ng-click giving Syntax Error: Token '{' invalid key at column 22 of the expression

regexp_matches - ERROR: invalid regular expression: quantifier operand invalid

bash syntax for regular expression

Angular Reactive Forms pattern validation: Invalid regular expression

Joi - Invalid Regular Expression

Invalid regular expression error in angular directive

NiFi: GetHTTP Processor Regular Expression Invalid Error

react-native start giving Invalid regular expression invalid error

Regular expression with conditionals in Javascript error -> Invalid regular expression

Invalid regular expression error in snowflake

Regular Expression and Function Syntax

Error in grepl(pattern, df): invalid regular expression

React Syntax Error. Unterminated Regular Expression

Invalid Regular Expression` Javascript

Javascript regular expression issue - run-time error JS5017: Syntax error in regular expression

Regular expression syntax for hours

Regular expression syntax difficulties

Invalid regular expression: Invalid group

Invalid syntax using regular expression in python 3.4

Regular expression 'is invalid'

R gsub regular expression syntax error

Javascript error: Invalid regular expression flags

Invalid regular expression error in RegExp

Syntax error in my phone regular expression (Internet Explorer 11)

i want to restrict multiple negative symbols in numeric using regex in typescript. im getting error SyntaxError: Invalid regular expression

Invalid regular expression in Marklogic

Invalid regular expression: invalid escape

ERROR: invalid regular expression: invalid character range in postgresql