I'm getting an unhandled rejection restApi::ApiNotConfiguredError thrown inside t.getRestApi() and not sure why, because I am pretty sure I configured it properly.
Simplified version of my code, in an attachment-sections iframe:
var trelloAuth = { appKey: "...", appName: "..." };
var t = TrelloPowerUp.iframe(trelloAuth);
var Promise = TrelloPowerUp.Promise;
t.render(render);
function render() {
return t.getRestApi() // Unhandled rejection error happens here
// tried adding a catch() here, no effect
.isAuthorized()
.then(function(authorized) {
if (authorized) {
return loadAndRender(t);
} else {
// display auth
}
});
}
And the error I get is:
Unhandled rejection restApi::ApiNotConfiguredError: To use the API helper, make sure you specify appKey and appName when you call TrelloPowerUp.iframe. See more at https://developers.trello.com/v1.0/reference#rest-api
at uo.getRestApi (https://p.trellocdn.com/power-up.min.js:1:131807)
at render (https://data-entry-trello.s3.amazonaws.com/trello-data-entry-xr/attachment-section.js:64:14)
at https://p.trellocdn.com/power-up.min.js:1:131226
at A (https://p.trellocdn.com/power-up.min.js:1:11735)
at C._settlePromiseFromHandler (https://p.trellocdn.com/power-up.min.js:1:58719)
at C._settlePromiseAt (https://p.trellocdn.com/power-up.min.js:1:59992)
at C._settlePromiseAtPostResolution (https://p.trellocdn.com/power-up.min.js:1:54662)
at Q._drainQueue (https://p.trellocdn.com/power-up.min.js:1:18865)
at Q._drainQueues (https://p.trellocdn.com/power-up.min.js:1:18943)
at Q.drainQueues (https://p.trellocdn.com/power-up.min.js:1:17242)
Any ideas what can cause this? I'm pretty sure I'm setting up everything correctly.
You can see the full version of the code at https://data-entry-trello.s3.amazonaws.com/trello-data-entry-xr/attachment-section.js - nothing really fancy going on!
Hi Jess,
Thanks for reaching out!
This would be a really great question to share in our developer community. We have a number of Trello Engineers that are active there, and they'd be happy to give some guidance for more advanced topics like these.
https://community.developer.atlassian.com/c/trello
All the best,
Lara
The Trello Team
Oops, I didn't realize they were separate forums! I will move over there. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.