Error 500 when creating a job

Hi,

I’m developing an app in python with stuart api integration and i’m receiving a 500 internal server error.

The response headers are this:
{‘Date’: ‘Thu, 25 Feb 2021 11:23:44 GMT’, ‘Content-Type’: ‘application/json; charset=utf-8’, ‘Transfer-Encoding’: ‘chunked’, ‘Connection’: ‘keep-alive’, ‘Status’: ‘500 Internal Server Error’, ‘Vary’: ‘Accept-Encoding, Origin’, ‘Content-Encoding’: ‘gzip’, ‘Stuart-Stack’: ‘V3’, ‘X-Request-Id’: ‘0f637125-2be2-4049-9d21-2665c57911cd’, ‘X-MinuteRateLimit-Limit’: ‘1000’, ‘X-MinuteRateLimit-Remaining’: ‘998’, ‘X-DailyRateLimit-Identifier’: ‘ratelimit:108.128.9.58:2021-02-25’, ‘X-Frame-Options’: ‘SAMEORIGIN’, ‘Cache-Control’: ‘no-cache’, ‘X-DailyRateLimit-Limit’: ‘500000’, ‘Referrer-Policy’: ‘strict-origin-when-cross-origin’, ‘X-Permitted-Cross-Domain-Policies’: ‘none’, ‘X-XSS-Protection’: ‘1; mode=block’, ‘X-MinuteRateLimit-Identifier’: ‘ratelimit:108.128.9.58:2021-02-25-12-23’, ‘X-DailyRateLimit-Remaining’: ‘499976’, ‘X-Download-Options’: ‘noopen’, ‘X-Runtime’: ‘1.128346’, ‘X-Content-Type-Options’: ‘nosniff’, ‘X-Powered-By’: ‘Phusion Passenger Enterprise 5.2.3’, ‘Server’: ‘nginx/1.12.2 + Phusion Passenger 5.2.3’}

Thanks in advance

Hi @emiceru,

Thank you for your question.
Could you provide us with the request details you’re sending which gives this response, this will help us investigate further? I would like to also confirm through this if your request is coming to our Sandbox environment?

Thanks @emiceru,

It looks like your using a deprecated URL, could you try with https://api.sandbox.stuart.com as found in our API documentation.

Do you remember where you found the URL you’re using? Maybe it’s still miss-documented somewhere.

I’ve change the url and it’s returns the same error

Hi,

Have you detect if my request arrive to your servers?

Thanks

I can see this order reached our system yes, and was delivered by our driver bots. I see 5 jobs created successfully on your account today. You should be able to see these in your dashboard history.

Are you still getting this 500 error when sending new requests?

Through postman it’s working but when I send the request throught my API I’ll receive 500 error.

I put the same headers, body and url and I don’t know what more test

I can see in our logs the error “invalid byte sequence in UTF-8”

It looks like the issue is coming from the special symbol in the ‘company’ field ‘í’ which your API is sending to us as ‘Fruter\xEDa’ which we aren’t able to process. In your successfully created orders we correctly receive ‘Frutería’.

Ok, I’ll test it.

Thank you very much

1 Like

Hi, I’ve testing it and it’s working now.

I only have to encode to UTF-8 the body data

Thanks a lot

BTW, Can I remove request data in the ticket? If don’t, can you remove it?

After I’ll comment the solution of the error

Thanks again

1 Like

We are very happy to hear that!

I deleted the post where you shared the data.

Have a great day!