Sever error 500 when listing piles
rjquiban opened this issue · 4 comments
rjquiban commented
When I make a request to list a pile, I get the error, "Unexpected token at < in JSON at position 0" as shown below:
However, when I visit the HTTP request link in my browser and POSTMAN, the response seems to work as expected:
I'm obtaining and storing the data the same way as my previous API calls that work, so I'm not sure if this is an error on my end or not. Thanks in advance!
crobertsbmw commented
Yeah, I don't think that's an error on the server end. How are you reading
the response in javascript?
…On Fri, Aug 28, 2020 at 1:12 AM Rian Jasmine (RJ) ***@***.***> wrote:
When I make a request to list a pile, I get the error, "Unexpected token
at < in JSON at position 0" as shown below:
[image: Screen Shot 2020-08-27 at 11 07 57 PM]
<https://user-images.githubusercontent.com/52214808/91527223-3345e080-e8ba-11ea-8cc0-c177a0fd41d2.png>
However, when I visit the HTTP request link in my browser and POSTMAN, the
response seems to work as expected:
[image: Screen Shot 2020-08-27 at 11 08 46 PM]
<https://user-images.githubusercontent.com/52214808/91527355-80c24d80-e8ba-11ea-9869-a064eb85f332.png>
I'm obtaining and storing the data the same way as my previous API calls
that work, so I'm not sure if this is an error on my end or not. Thanks in
advance!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#88>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMQLHU3YF3T6J4WFHEGUPTSC5DDJANCNFSM4QNYRB6A>
.
rjquiban commented
crobertsbmw commented
I don't usually live in the javascript world, so I'm not quite sure. The
error says "Unexpected token at < in JSON at position 0" at index.js line
95. Which line is line 95?
…On Fri, Aug 28, 2020 at 1:59 PM Rian Jasmine (RJ) ***@***.***> wrote:
[image: Screen Shot 2020-08-28 at 11 57 22 AM]
<https://user-images.githubusercontent.com/52214808/91605679-b2bcc980-e925-11ea-82e0-38dc45e0d763.png>
This is my code, and I make sure to call it after I have already created a
pile.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#88 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMQLHX227NIIO37APA63OLSC75ADANCNFSM4QNYRB6A>
.
rjquiban commented
Line 95 is the console.log(error) catch case. I'll keep exploring my code to try and find a solution. Thanks anyways for your help!