I have given value of secretKeyOrPrivateKey value but same error again and again.
Please use this link for ref : https://docs.nestjs.com/security/authentication
Related
I'm making an API using Express. The request query was sent via Postman to test the GET request, but the desired result is not available.
For example, Postman created a query as below and requested it.
Key : userId, Value : 1
Key : routine[], Value : routine-ZMp#%26nSqOTv1Tsf$459Xp8Ku
Key : routine[], Value : routine-mC%26w*CU!tvTA(RE4pE%234J1d#
Key : routine[], Value : routine-Hn%23fmJ0*90AR%H)6ayLUN$TP
Key : routine[], Value : routine-%23fm%23JO
The expected log value of the routine array on the actual API server is as follows.
[routine-ZMp#&nSqOTv1Tsf$459Xp8Ku, routine-mC&w*CU!tvTA(RE4pE#4J1d#, routine-Hn#fmJ0*90AR%H)6ayLUN$TP, routine-#fm#JO]
Here's the actual log result.
[routine-ZMp#&nSqOTv1Tsf$459Xp8Ku, routine-mC&w*CU!tvTA(RE4pE#4J1d#, routine-Hn%23fmJ0*90AR%H)6ayLUN$TP, routine-#fm#JO]
The log is being output without changing the value of the second index from %23 to #. Strangely, the value of the third index is converted normally. I don't understand what the problem is. Why do you get this result?
decodeURIComponent("routine-Hn%23fmJ0*90AR%H)6ayLUN$TP")
throws a "URI malformed exception", because the % preceding the H is not percent-encoded. I assume that this value is therefore left un-decoded. The correctly encoded query value would be
Key : routine[], Value : routine-Hn%23fmJ0*90AR%25H)6ayLUN$TP
I would like to send this dynamic content:
content:#concat(formatDateTime(adddays(utcnow(),-1),'mm'),formatDateTime(adddays(utcnow(),-1),'dd'))
from web activity in Azure Data Factory to logic Apps.
on the logic app side I have defined such a body:
in the second step I would like to extract the value:
but after running at this step I get this error:
InvalidTemplate. Unable to process template language expressions in action 'Extract' inputs at line '1' and column '1292': 'The template language expression 'triggerBody()?['ID']' cannot be evaluated because property 'ID' cannot be selected. Property selection is not supported on values of type 'Integer'. Please see https://aka.ms/logicexpressions for usage details.'.
How can I solve this problem?
Add
Content-type = application/json
in request header.
From my test and your error message, your ID in your content must be like this:
{
"ID":222223
}
In this way, The ID would be in String type. So you need to change your ID into String type like this:
{
"ID":"222223"
}
Or change your JSON Schema "ID" type to Integer and the Variable Type to Integer. Then the logic apps will work.
I am trying to get the Property value and Set it with different value in SoapUI's "REST Request Properties" (NOT the custom properties). It just gives me NULL value
Here is what I did:
1. Get test step object
2. get the property value with name of the property => It is giving me null value.
I know I am getting the correct object as I was able to rename the same Test Step name with following code
def restRequest = testRunner.testCase.getTestStepByName("Test");
def a = restRequest.getPropertyValue("Method")
log.info(a) // this gives null
restRequest.setName("Test1") // This works
In the step object, there is another object called testRequest from which you can get all those required properties.
For example if you want to get all the properties
log.info step.testRequest.metaClass.methods*.name
For example if you want to know the get methods
log.info step.testRequest.metaClass.methods*.name.findAll {it.startsWith('get')}
Similarly you can get the methods to set the value as well.
For instance, you want to modify Pretty Print from true to false:
step.testRequest.setPrettyPrint(false)
log.info step.testRequest.properties['prettyPrint']
Similarly, you can find the required property name, find the right method to modify the value as per your needs.
I have more than one element on page which has same xpath and same id/name , there are two fields on page with same locators i tried to enter value at desired location with below code
element.all(by.xpath('//*[#id="testInstanceScan"]')).get(1).sendKeys('Vkumar');
but I faced error message:
Failed: Index out of bound. Trying to access element at index: 1, but
there are only 1 elements that match locator By(xpath,
//*[#id="testInstanceScan"] )
if i used element.all('#testInstanceScan').get(1).sendKeys('Vkumar');
i faced error
Failed: Invalid locator Stack: TypeError: Invalid locator
Tried with element.all(by.css('#testInstanceScan')).get(0).sendKeys('Vkumar');
but its not the desired place for this value,.
values is entered in previous fields with this 0th intdex.
If you need a single element, that has a unique ID, you don't need to use element.all() but element().
Your code should be
element(by.css('#testInstanceScan')).sendKeys('Vkumar');
Or even shorter:
$('#testInstanceScan').sendKeys('Vkumar');
Check also the API on Protractor Homepage
To prove, that there is only one element you can try this:
element.all(by.css('#testInstanceScan')).count().then(function(numberOfElems){
console.log('For this ID I found '+numberOfElems+' elements.');
})
I'm using collection form type, where children has datetime type input as single text. But when I submit data in validation fails and getErrorsAsString shows this strange error:
inputDateTime:
ERROR: This value is not valid.
date:
No errors
time:
No errors
Here is how I add my field
//form child
$builder->add('inputDateTime', 'datetime', array(
'date_widget' => 'single_text',
'time_widget' => 'single_text'
));
Why inputDateTime has errors but neither date or time has errors? My locale is set and I tried to add date format but it didn't help.
The "error_bubbling" property of the "date" and the "time" field is set to true, thus errors on those fields bubble up and are attached to the datetime field instead.
You are right that the error message is not very helpful (there's an open ticket for that) but you can debug the problem by printing the $exception variable in the block that catches the TransformationFailedException generated by the DataTransformer (Form.php:611). The exception contains the detailed error description, which is hidden from the end user for security purposes.
In fact it appears that is due to an invalid format date (when you are using a different format which can appears when you have set another timezone or locale for instance). As a result, you juste have to specify the date_format options for the datetime field.
In my case, this solve the issue :
'date_format' => 'dd/MM/yyyy',