Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected restApi::ApiNotConfiguredError

Jess Kenney
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 8, 2021

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!

1 answer

1 accepted

0 votes
Answer accepted
Lara
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 21, 2021

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

Jess Kenney
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 22, 2021

Oops, I didn't realize they were separate forums! I will move over there. Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events