Closed manishapriya94 closed 3 years ago
@manishapriya94 The code seems to be completed and functional with the TestLob
secret. However the LiveLob
secret looks to be still throwing a 401
error which means it's not authenticating correctly.
Can you double check to make sure the Environment variables within Heroku are up to date and accurate?
Let me slack what I'm seeing in #devs
the API call in Lob EndPoints is not working.
This is the response i get if I try with a template_id:
Any idea why @BeeXiong
Updated code to remove try catch issue that @hamdaankhalid identified.
The time out issue should be address but we are now returning a status 404 (Not Found). Local development seems to work 👇
Current error from heroku logs:
@manishapriya94 - Can you check lob to see if these templates exist within Lob? I don't have access I think.
This is what it is for live:
This is what it is for test:
Seems like the second templ one was deleted though …
Okay. So the endpoint should be working and does bring back data from Lob.
Our problem is that we have a disconnect with the data in the DB compared to what is actually in Lob + Lob has different templates for each environment. I assumed templates would work for both but apparently not.
Here's what our DB has...
@manishapriya94 - Can you give us a list of what is in Lob.
LiveLob
secret, it wouldn't work for a template that test templatesThat's interesting. I'm curious what test and live mean in this case? Do we need both?
Also, I tried both calls.
The test version resulted in:
Seems like it's working for you locally but not through heroku? Is this because of the disconnect btw live and test or another issue?
The live version resulted in:
Is this what we're looking for in terms of data? It seems like the html tags aren't loading properly or am I reading this incorrectly?
Seems like it's working for you locally but not through heroku? Is this because of the disconnect btw live and test or another issue?
This template tmpl_1057bb6f50f81fb
worked locally when I used the TestLob
secret locally. When I tried to use the LiveLob
secret, it did not work locally.
Since the app is configured to automatically pull the LiveLob
secret from Heroku, only the templates (such as tmpl_dd329a670255dd8
) will work as they are configured in Lob to be "Live Templates".
Something also seems to be wrong with the html tags as you mentioned. @manishapriya94 can you confirm
For simplicity sake it seems like just streamlining to live would be best (they're the only letters that can be sent) or would you want the test for internal testing purpose?
By html tags, do you mean content of the letter? @mahrsbar
Let me refresh all templates and provide only live template IDs for the letters we have in db @BeeXiong
I think @mahrsbar is referring to how the HTML only has "deails" within the tags.
The one that is in the test environment has a lot more HTML code within the tags
@mahrsbar oh the html tags may be limited since we created a lot of empty shells
Ahh, okay. I think sticking with live version works. Will this change the API call used in the front end?
Is it possible to add some text in the html tags to the live versions just so once its called in the front-end, some kind of letter text is available to view? Not necessary but would be beneficial for testing and design.
@mahrsbar updated!
Thank you! The letter_version api needs to be updated to get the live template_id instead of the test one right? @BeeXiong
Thank you! The letter_version api needs to be updated to get the live template_id instead of the test one right? @BeeXiong
We need to update the database to have correct template_id information. For now @mahrsbar, I'd say you could hard code the template_id that works with the Live environment. Just awaiting what we have in lob to do that in the DB.
I also agree that we should just create everything in the Live environment for templates
For now lets keep it to one version of each across the federal, state, local templates of each letter unless the policy is state specific (In AAAJ's case)
@manishapriya94 - Saw that the Jobs for All Act was an unknown campaign. Per our conversation, could you provide me with the data to put into the db? Structure is below.
Once I have that foreign key for the campaign, I can add a new record for that Jobs for All Act template_id tmpl_8f8b18039d528a1
(data structure for letter_version table below)
Yep! Will add a campaign adder issue EOD For now: org: Sunrise Movement name: Jobs for All Act cause: Climate Justice type: Grant page_url: https://www.sunrisemovement.org/
For AAAJ, lets make the name Education Access for All Act?
Updated
Jumping back in this... Any task left to do for this?
If so, let's edit this comment to put task.
If not, let's close this issue to clean up a bit.
User campaign id to send frontend information on which template_id to display
Implementation