× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I'd expect
400 Bad Request - the server cannot or will not process the request due to
an apparent client error (e.g., malformed request syntax, size too large,
invalid request message framing, or deceptive request routing).

However, are you sure the characters are actually invalid? JSON is UTF-8.

Are the characters invalid only because you're trying to stuff them into an
EBCDIC variable?

You may need to stuff them into a UTF-8 and then remove any chars you can't
handle.

Charles




On Wed, Oct 6, 2021 at 2:51 AM Dave <dfx1@xxxxxxxxxxxxxx> wrote:

Hello,

I'm getting an error caused by invalid characters in the JSON data that my
program is reading. I've made the program end and issued a call
to YAJL_writeStdOut with the error message. I'm not sure what value I
should use as http status, 200 or 500? Also, I have no idea how this will
be received or used by the client. I'm guessing that it should be his
responsibility to indicate how such errors should be returned?

Thanks
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.