-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
agent call to registrar /authorizations/requests returns critical error #10
Comments
My bad, I changed the signature profile, updated docs I have on my machine, but did not share. Since it is a JSON document being POSTed, it is an array, not a comma separated list for the resources { token: token On Jan 18, 2013, at 9:31 PM, GregTurner notifications@github.com wrote:
|
Makes it consistent, thank-you. After switching to JSON, critical error: Request: POST http://registrar.local.a2p3.net:8080/authorizations/requests HTTP/1.1 {"token":"nf1-Fv771smnEPSWlmVMiQ","authorizations":["email.local.a2p3.net","registrar.local.a2p3.net"]} Response: HTTP/1.1 200 OK { |
You have the wrong content type application/x-www-form-urlencoded must be application/json On Jan 18, 2013, at 9:58 PM, GregTurner notifications@github.com wrote:
|
Doh, now its my bad. |
Request from Agent:
POST http://registrar.local.a2p3.net:8080/authorizations/requests HTTP/1.1
Host: registrar.local.a2p3.net:8080
Connection: keep-alive
Content-Length: 91
Cache-Control: max-age=0
Accept: /
Origin: http://localhost
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://localhost/a2p3_agent/index.html
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: connect.sess=s%3Aj%3A%7B%7D.c7bsS5LCqDydkISNsF17rp9VHhQ1a4zcv9Fq7Y3Z5Pc
authorizations=email.local.a2p3.net%2Cregistrar.local.a2p3.net&token=nf1-Fv771smnEPSWlmVMiQ
Response from registrar:
HTTP/1.1 200 OK
X-Powered-By: Express
Content-Type: application/json; charset=utf-8
Content-Length: 850
Date: Sat, 19 Jan 2013 05:26:13 GMT
Connection: keep-alive
{
"error": {
"code": "UNKNOWN",
"message": "Object email.local.a2p3.net,registrar.local.a2p3.net has no method 'forEach'",
"stack": "TypeError: Object email.local.a2p3.net,registrar.local.a2p3.net has no method 'forEach'\n at Object.exports.getAnytimeAppKeys (C:\Users\gturner\Documents\GitHub\a2p3\app\lib\db_dev.js:267:8)\n at authorizationsRequests (C:\Users\gturner\Documents\GitHub\a2p3\app\registrar\registrar.js:77:6)\n at callbacks (C:\Users\gturner\Documents\GitHub\a2p3\node_modules\express\lib\router\index.js:161:37)\n at C:\Users\gturner\Documents\GitHub\a2p3\app\registrar\registrar.js:35:9\n at exports.validAgent (C:\Users\gturner\Documents\GitHub\a2p3\app\lib\db_dev.js:120:35)\n at process.startup.processNextTick.process._tickCallback (node.js:244:9)"
}
}
ServerConsole:
TypeError: Object email.local.a2p3.net,registrar.local.a2p3.net has no method 'forEach'
at Object.exports.getAnytimeAppKeys (C:\Users\gturner\Documents\GitHub\a2p3\app\lib\db_dev.js:267:8)
at authorizationsRequests (C:\Users\gturner\Documents\GitHub\a2p3\app\registrar\registrar.js:77:6)
at callbacks (C:\Users\gturner\Documents\GitHub\a2p3\node_modules\express\lib\router\index.js:161:37)
at C:\Users\gturner\Documents\GitHub\a2p3\app\registrar\registrar.js:35:9
at exports.validAgent (C:\Users\gturner\Documents\GitHub\a2p3\app\lib\db_dev.js:120:35)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
registrar.local.a2p3.net POST /authorizations/requests 200 6 ms - -
Error: No 'token' parameter in POST
at checkValidAgent (C:\Users\gturner\Documents\GitHub\a2p3\app\registrar\registrar.js:21:13)
at callbacks (C:\Users\gturner\Documents\GitHub\a2p3\node_modules\express\lib\router\index.js:161:37)
at param (C:\Users\gturner\Documents\GitHub\a2p3\node_modules\express\lib\router\index.js:135:11)
at pass (C:\Users\gturner\Documents\GitHub\a2p3\node_modules\express\lib\router\index.js:142:5)
at Router._dispatch (C:\Users\gturner\Documents\GitHub\a2p3\node_modules\express\lib\router\index.js:170:5)
at Object.router (C:\Users\gturner\Documents\GitHub\a2p3\node_modules\express\lib\router\index.js:33:10)
at next (C:\Users\gturner\Documents\GitHub\a2p3\node_modules\express\node_modules\connect\lib\proto.js:199:15)
at Object.cookieSession [as handle](C:UsersgturnerDocumentsGitHuba2p3node_modulesexpressnode_modulesconnec
tlibmiddlewarecookieSession.js:113:5)
at next (C:\Users\gturner\Documents\GitHub\a2p3\node_modules\express\node_modules\connect\lib\proto.js:199:15)
at Object.cookieParser [as handle](C:UsersgturnerDocumentsGitHuba2p3node_modulesexpressnode_modulesconnect
libmiddlewarecookieParser.js:60:5)
registrar.local.a2p3.net POST /authorizations/requests 200 5 ms INVALID_API_CALL
No 'token' parameter in POST
TypeError: Object email.local.a2p3.net,registrar.local.a2p3.net has no method 'forEach'
at Object.exports.getAnytimeAppKeys (C:\Users\gturner\Documents\GitHub\a2p3\app\lib\db_dev.js:267:8)
at authorizationsRequests (C:\Users\gturner\Documents\GitHub\a2p3\app\registrar\registrar.js:77:6)
at callbacks (C:\Users\gturner\Documents\GitHub\a2p3\node_modules\express\lib\router\index.js:161:37)
at C:\Users\gturner\Documents\GitHub\a2p3\app\registrar\registrar.js:35:9
at exports.validAgent (C:\Users\gturner\Documents\GitHub\a2p3\app\lib\db_dev.js:120:35)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
registrar.local.a2p3.net POST /authorizations/requests 200 5 ms - -
TypeError: Object email.local.a2p3.net,registrar.local.a2p3.net has no method 'forEach'
at Object.exports.getAnytimeAppKeys (C:\Users\gturner\Documents\GitHub\a2p3\app\lib\db_dev.js:267:8)
at authorizationsRequests (C:\Users\gturner\Documents\GitHub\a2p3\app\registrar\registrar.js:77:6)
at callbacks (C:\Users\gturner\Documents\GitHub\a2p3\node_modules\express\lib\router\index.js:161:37)
at C:\Users\gturner\Documents\GitHub\a2p3\app\registrar\registrar.js:35:9
at exports.validAgent (C:\Users\gturner\Documents\GitHub\a2p3\app\lib\db_dev.js:120:35)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
registrar.local.a2p3.net POST /authorizations/requests 200 4 ms - -
TypeError: Object email.local.a2p3.net,registrar.local.a2p3.net has no method 'forEach'
at Object.exports.getAnytimeAppKeys (C:\Users\gturner\Documents\GitHub\a2p3\app\lib\db_dev.js:267:8)
at authorizationsRequests (C:\Users\gturner\Documents\GitHub\a2p3\app\registrar\registrar.js:77:6)
at callbacks (C:\Users\gturner\Documents\GitHub\a2p3\node_modules\express\lib\router\index.js:161:37)
at C:\Users\gturner\Documents\GitHub\a2p3\app\registrar\registrar.js:35:9
at exports.validAgent (C:\Users\gturner\Documents\GitHub\a2p3\app\lib\db_dev.js:120:35)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
registrar.local.a2p3.net POST /authorizations/requests 200 10 ms - -
The text was updated successfully, but these errors were encountered: