Method and apparatus for automatically repairing API response, and recording medium

The electronic device automatically corrects API response errors by returning default values and generating log data, ensuring e-commerce platforms maintain functionality and user experience by addressing API response issues.

WO2026049148A1PCT designated stage Publication Date: 2026-03-05COUPANG CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2024/020162
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-28
Filing Date
2024-12-10
Publication Date
2026-03-05

AI Technical Summary

Technical Problem

Existing e-commerce platforms face challenges in generating user pages due to errors in API responses, such as incorrect formatting or data errors, leading to user inconvenience and difficulty in identifying error causes.

Method used

An electronic device automatically corrects API responses by returning default values for erroneous components and generates log data for error analysis, ensuring essential components function correctly and preventing future errors.

Benefits of technology

This approach enhances user experience by maintaining functionality despite errors, allowing users to interact with essential app components and identifies error causes for prevention, thus improving customer convenience and service reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2024020162_05032026_PF_FP_ABST
    Figure KR2024020162_05032026_PF_FP_ABST
Patent Text Reader

Abstract

A technique for automatically repairing an API response is disclosed. A method performed by an electronic device, according to one aspect of the present disclosure, may comprise the steps of: receiving, from a client, an API request for a component included in a page provided by a mobile application, and transmitting same to a server; receiving, from the server, an API response corresponding to the API request; determining whether the API response is a normal response; and, according to determining that the API response is not a normal response, returning, to the client, a default value corresponding to the API request.
Need to check novelty before this filing date? Find Prior Art

Description

How to automatically modify API responses, devices, and recording media

[0001] The present disclosure relates to a method for automatically modifying API responses.

[0002] With the advancement of communication technology and changes in the social environment, e-commerce services are providing a variety of products and services to a large number of users through e-commerce platforms (e.g., online platforms). Users can access the various functions and services provided by e-commerce services by running mobile applications on their devices.

[0003] The user terminal can transmit and receive data with the server and provide various pages for purchasing products and services. The user terminal can transmit an API request to the server, requesting various data necessary for running the mobile application. Upon receiving the API request, the server can transmit an API response containing various data necessary for running the mobile application to the user terminal. The user terminal can generate a page based on the received API response.

[0004] However, if the API response received by the user terminal contains an error, it may be difficult for the user terminal to generate a page. For example, if the data included in the API response is formatted incorrectly or contains an error in the data value, the page containing that data may not be generated.

[0005] A technical problem to be solved through one embodiment of the present disclosure is to automatically correct an API response received by a user terminal when an error is included in the API response, thereby providing an environment in which the user does not experience inconvenience in using an e-commerce service.

[0006] Another technical challenge to be solved through one embodiment of the present disclosure is to automatically generate log data for errors included in API responses, thereby identifying the cause of errors and preventing future occurrence of errors, thereby improving user convenience and customer experience.

[0007] Another technical challenge to be solved through one embodiment of the present disclosure is to intensively manage errors occurring in API responses corresponding to components essential for a user's use of e-commerce services among multiple components included in a page of a mobile application.

[0008] The technical problems of the present disclosure are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by those skilled in the art of the present disclosure from the description below.

[0009] A method performed by an electronic device according to one aspect of the present disclosure may include the steps of: receiving an API request for a component included in a page provided by a mobile application from a client and transmitting the request to a server; receiving an API response corresponding to the API request from the server; determining whether the API response is a normal response; and returning a default value corresponding to the API request to the client when the API response is determined not to be a normal response.

[0010] In one embodiment, the step of returning a default value corresponding to the API request to the client may include the step of instructing the client's mobile application to provide a page that does not include the component.

[0011] In one embodiment, the method may further include returning the API response to the client upon determining that the API response is a normal response.

[0012] In one embodiment, the method may further include: determining whether the component is a predefined required component; and transmitting log data for the API response to the server upon determining the component as the required component.

[0013] In one embodiment, the log data may include at least one of an API path, an error occurrence reason, a call stack, and user information.

[0014] In one embodiment, the essential component may include a component among one or more components provided by the mobile application that a user must interact with in order to purchase a product.

[0015] In one embodiment, the required component may include at least one of a menu list, a purchase button, a payment button, and a delivery address input button.

[0016] An electronic device according to one embodiment of the present disclosure comprises one or more processors, one or more memories storing instructions to be executed by the one or more processors, and when the instructions are executed by the one or more processors, the one or more processors may be configured to execute a method according to the present disclosure.

[0017] In one embodiment of the present disclosure, a non-transitory computer-readable recording medium having recorded thereon instructions that, when executed by one or more processors, cause the one or more processors to perform an operation, the instructions may be configured to cause the one or more processors to perform a method according to the present disclosure.

[0018] According to various embodiments of the present disclosure, if an API response received by a user terminal contains an error, the API response can be automatically corrected to provide an environment in which the user can use an e-commerce service without inconvenience.

[0019] According to various embodiments of the present disclosure, log data for errors included in API responses can be automatically generated to identify the cause of errors and prevent future occurrence of errors, thereby improving user convenience and customer experience.

[0020] According to various embodiments of the present disclosure, it is possible to intensively manage errors occurring in API responses corresponding to components essential for a user's use of an e-commerce service among a plurality of components included in a page of a mobile application.

[0021] The effects according to the technical idea of ​​the present disclosure are not limited to the effects mentioned above, and other effects not mentioned can be clearly understood by a person skilled in the art from the description of the specification.

[0022] FIG. 1 illustrates an environment in which an electronic device according to one embodiment of the present disclosure can be applied.

[0023] FIG. 2 is a block diagram of an electronic device according to one embodiment of the present disclosure.

[0024] FIG. 3 is a software block diagram of an electronic device according to one embodiment of the present disclosure.

[0025] FIG. 4 illustrates an error occurrence screen (400) displayed on a user terminal according to one embodiment of the present disclosure.

[0026] FIG. 5 illustrates a page provided by a user terminal when a normal API response is received according to one embodiment of the present disclosure.

[0027] FIG. 6 illustrates a page provided by a user terminal when an abnormal API response is received according to one embodiment of the present disclosure.

[0028] FIG. 7 is a flowchart of a method for automatically modifying an API response according to one embodiment of the present disclosure.

[0029] The various embodiments described in this document are exemplified for the purpose of clearly explaining the technical concept of the present disclosure and are not intended to limit it to a specific embodiment. The technical concept of the present disclosure includes various modifications, equivalents, alternatives, and embodiments selectively combining all or part of each embodiment described in this document. Furthermore, the scope of the technical concept of the present disclosure is not limited to the various embodiments presented below or the specific descriptions thereof.

[0030] Terms used in this document, including technical or scientific terms, unless otherwise defined, may have the meaning commonly understood by one of ordinary skill in the art to which this disclosure belongs.

[0031] The expressions "includes," "may include," "comprises," "may have," "have," and "may have" used in this document imply the presence of a target feature (e.g., a function, operation, or component), but do not exclude the presence of other additional features. In other words, such expressions should be understood as open-ended terms that imply the possibility of including other embodiments.

[0032] The singular forms used in this document may include the plural form unless the context clearly indicates otherwise, and this also applies to the singular forms set forth in the claims.

[0033] The expressions "first," "second," or "first", "second", etc. used in this document, unless the context indicates otherwise, are used to refer to multiple similar objects and to distinguish one object from another, and do not limit the order or importance among the objects.

[0034] As used herein, the expressions "A, B, and C", "A, B, or C", "A, B, and / or C", or "at least one of A, B, and C", "at least one of A, B, or C", "at least one of A, B, and / or C", etc., may refer to each of the listed items or to all possible combinations of the listed items. For example, "at least one of A or B" may refer to (1) at least one A, (2) at least one B, (3) at least one A and at least one B.

[0035] The term "component" as used herein may refer to software or hardware components such as field-programmable gate arrays (FPGAs) and application specific integrated circuits (ASICs). However, the "component" is not limited to hardware and software. The "component" may be configured to be stored on an addressable storage medium, and may be configured to execute one or more processors. In one embodiment, the "component" may include components such as software components, object-oriented software components, class components, and task components, as well as processors, functions, properties, procedures, subroutines, segments of program code, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays, and variables.

[0036] The expression "based on" as used in this document is used to describe one or more factors that influence the decision, act of judgment, or action described in the phrase or sentence containing the expression, and this expression does not exclude additional factors that influence the decision, act of judgment, or action.

[0037] As used herein, the expression that a component (e.g., a first component) is “connected” or “connected” to another component (e.g., a second component) may mean that the component is directly connected or connected to the other component, as well as connected or connected via a new other component (e.g., a third component).

[0038] The expression "configured to" as used in this document can mean "set to do", "having the ability to do", "modified to do", "made to do", "capable of doing", etc., depending on the context. The expression is not limited to the meaning of "specifically designed in hardware", and for example, a processor configured to perform a specific operation can mean a generic-purpose processor that can perform the specific operation by executing software.

[0039] The term "user interface" as used herein may refer to a physical or virtual medium designed to enable communication between a user and an object, system, machine, or computer program. Users may utilize e-commerce services through the user interface. For example, a user interface may include basic elements for displaying specific information, such as images or text, and elements for receiving user input, such as icons and buttons, that can be configured by utilizing these basic elements. For example, selecting (clicking) a user interface by a user may be expressed as receiving user input corresponding to the user interface. Furthermore, a user interface may be provided in the form of an element, such as a widget, that can perform both the functions of displaying specific information to a user and receiving user input, by combining basic elements, such as images and text, and elements for receiving user input.

[0040] Hereinafter, various embodiments of the present disclosure will be described with reference to the attached drawings. In the attached drawings and the description of the drawings, identical or substantially equivalent components may be assigned the same reference numerals. Furthermore, in the description of various embodiments below, duplicate descriptions of identical or corresponding components may be omitted, but this does not mean that the corresponding components are not included in the embodiments.

[0041] FIG. 1 is a diagram illustrating an environment in which an electronic device according to one embodiment of the present disclosure can be applied.

[0042] An electronic device (110) and a user terminal (120) are connected through a network and can communicate with each other. The electronic device (110) may be a server or a different terminal from the user terminal (120).

[0043] The electronic device (110) may be a server device that provides an e-commerce service. That is, the electronic device (110) may be a server device operated under the management of an operator of the e-commerce service.

[0044] An electronic device (110) can manage information about users using e-commerce services. The user information managed by the electronic device (110) may include, for example, the user's name, age, address, or contact information. Managing user information can encompass a series of actions involving controlling and processing that information. For example, managing user information can include storing, updating, or modifying that information.

[0045] An electronic device (110) can manage information about items provided by an e-commerce service. An e-commerce service may provide users with a service that allows them to purchase goods, such as items, food, or products. Alternatively, the e-commerce service provided by the electronic device (110) may include a service that mediates the sale of goods by some users to other users. Information about items managed by the electronic device (110) may include, for example, item identification information, item name, product information corresponding to the item, item price, item capacity, item size, item weight, item attributes, category, or unit price. An item may be a sales unit of a product, and even for the same product, it may be provided to users as different items. For example, even for the same product, it may be sold as different items with different sales unit quantities and prices. Therefore, different items may share product information. Managing information about an item can collectively refer to a series of actions that control and process that information. For example, managing information about an item may include storing, updating, or modifying that information.

[0046] The electronic device (110) can manage various information to be provided to users using e-commerce services. Based on requests from an administrator managing the e-commerce service or a user using the e-commerce service, the electronic device (110) can manage various data necessary to provide e-commerce services. For example, the electronic device (110) can create, modify, store, or provide to users data related to various pages associated with the e-commerce service, such as an item list page, a product detail page, a search results page, a product sales page, an event page, and landing pages requested by users.

[0047] Regarding the management method of the electronic device (110), in one embodiment, the electronic device (110) can manage information associated with the provision of e-commerce services based on user input. For example, the electronic device (110) may be a device running a mobile application (or "app") for utilizing e-commerce services. The mobile application provides various functions necessary for users to utilize e-commerce services on portable electronic devices such as smartphones and tablets, and can interact with users through a user interface (UI). For example, users can exchange messages or share photos with other users through social networking apps, and can also manage banking transactions using financial apps. These mobile apps often have specialized functions and aim to provide convenience and efficiency to users.

[0048] A mobile application may include multiple components. Components refer to various elements that make up the user interface (UI) of a mobile application, and may include, for example, at least one of a button, an input field, an icon, a checkbox, a list, a card, a slider, a dialog, a search bar, a tab bar, a navigation bar, a progress bar, a toggle switch, a grid view, a modal window, and a push notification.

[0049] According to one embodiment, at least some of the components may be determined as required components. A required component may refer to one or more components provided by a mobile application that a user must interact with in order to purchase a product or service. For example, a required component may include at least one of a menu list from which a user can select a desired product or menu on a product detail page (Search Detail Page, SDP), a purchase button for purchasing the selected product or menu, a payment button, and a delivery address input button. Additionally, any component that a user must interact with in order to purchase a product or service provided by the mobile application may be determined as required components. These required components may be determined in advance by the user or a server administrator.

[0050] According to one embodiment, the electronic device (110) may store a configuration file containing various data used to set and adjust the operation method of software (e.g., a mobile application) running on the user terminal (120). According to one embodiment, the configuration file may be written in text in a predetermined format (e.g., key-value pairs). For example, the configuration file may store initial settings for running the mobile application (e.g., database connection information, API keys, server URLs, etc.) and user-specific customized settings.

[0051] The configuration file may include a definition of the data type or data value of the server's API response in response to the user terminal's API request. For example, the configuration file may include a definition that the server response to the user terminal's first API request must include a first data type. For example, the configuration file may include a definition that the first API response to the first API request includes INT data. According to another embodiment, the configuration file may include a definition that the response to the first API request must include a first value. According to one embodiment, the configuration file may further include a definition of a default value of the API response. For example, the configuration file may include a definition of a default value for each data type (e.g., int, char, short, long, float, double, Boolean, class, interface, array, enum, etc.) of data included in the API response.

[0052] In one embodiment, the electronic device (110) may provide a page related to the e-commerce service to the user terminal (120) based on a request from a user using the e-commerce service. Here, the page related to the e-commerce service provided to the user terminal (120) may include a page that provides various information about items that the user can purchase, a page regarding the purchase of an item requested by the user, a shopping cart page for purchasing an item, a page providing a list of items searched in various ways, a page providing detailed information about an item, etc. The page providing operation may include an operation of providing the user with at least a portion of all data generated in the process of the user using the e-commerce service. The page may include various graphical interfaces through which the electronic device (110) can interact with the user in order to perform functions supported by the mobile application.

[0053] In addition, the electronic device (110) can manage transactions related to e-commerce services provided to users, i.e., transactions related to online products (e.g., goods or services). That is, the electronic device (110) can manage a series of processes, such as allowing users to search for, select, purchase, pay for, and request delivery of items. As such processes, the electronic device (110) can provide information regarding items and delivery to the user so that the user can search for, select, purchase, pay for, and request delivery of items, and can receive purchase, payment, and delivery requests from the user. In addition, it should be noted that even if an operation that the electronic device (110) can perform is not mentioned in the present disclosure, if it is a general operation that a server device providing a known e-commerce service can perform, applying the technical ideas of the present disclosure with reference to that operation is not excluded from the scope of the present disclosure.

[0054] The electronic device (110) may be a server device that manages an e-commerce service. In other words, the electronic device (110) may be a server device that manages a platform that provides an e-commerce service. A user may subscribe to the e-commerce service and purchase an item through the e-commerce service. The user terminal (120) may transmit an input requesting item information to the electronic device (110), and the electronic device (110) may provide the item information to the user terminal (120).

[0055] The electronic device (110) described above may be implemented as one or more computing devices. For example, all functions of the electronic device (110) may be implemented in a single computing device. For another example, a first function of the electronic device (110) may be implemented in a first computing device, and a second function may be implemented in a second computing device. As another example, multiple computing devices may be used, each of which implements all or specific functions of the electronic device (110). The computing devices described above may be, but are not limited to, a desktop computer, a laptop computer, an application server, a proxy server, or a cloud server, and any type of device equipped with computing functions may be a computing device.

[0056] The user terminal (120) may be a device for a user to use an e-commerce service. The user terminal (120) may be implemented as a terminal capable of transmitting and receiving various information with the electronic device (110) via a network. For example, the user terminal (120) may be one of a computer, a laptop, a portable communication terminal (such as a smartphone), a portable multimedia device, a wearable device, or an HMD. However, the type of the user terminal (120) is not limited thereto, and the user terminal (120) may be any device that includes an input / output interface capable of receiving information from a user or outputting information to a user, and that can communicate with the electronic device (110) or other devices via a network.

[0057] The user terminal (120) can provide information received from the electronic device (110) to the user, and can receive input from the user and transmit it to the electronic device (110). Specifically, the user terminal (120) can obtain inputs from the user that instruct to call various pages, and generate commands that instruct to call various pages in response to the obtained inputs. The user terminal (120) can transmit commands that instruct to call various pages to the electronic device (110). The input obtained from the user can include various forms of input, such as a click using a mouse, a touch using a touchpad or a touch screen, voice recognition, and other electronic inputs. The user terminal (120) can receive various pages from the electronic device (110) and output the received various pages.

[0058] The user terminal (120) may be a device for a user to use a delivery order service. The user terminal (120) may be implemented as a terminal capable of transmitting and receiving various information with the electronic device (110) via a network. For example, the user terminal (120) may be one of a computer, a laptop, a portable communication terminal (such as a smartphone), a portable multimedia device, a wearable device, or an HMD. However, the type of the user terminal (120) is not limited thereto, and the user terminal (120) may be any device that includes an input / output interface capable of receiving information from a user or outputting information to a user, and that can communicate with the electronic device (110) or other devices via a network.

[0059] A network may serve to connect an electronic device (110) and a user terminal (120) or other external device. For example, the network may provide a connection path so that a user terminal (120) or other external device can be connected to the electronic device (110) and transmit and receive packet data with the electronic device (110). The network may be implemented as any type of wired or wireless network, such as a local area network (LAN), a wide area network (WAN), a mobile radio communication network, or Wibro (Wireless Broadband Internet).

[0060] In one embodiment, the electronic device (110) and the user terminal (120) may operate as a single device. The user terminal (120) may be included in the electronic device (110) as a component of all or part of the electronic device (110). In this case, for example, various types of information exchanged between the electronic device (110) and the user terminal (120) via a network may be various types of information exchanged between components within a single device.

[0061] Electronic devices (e.g., electronic device (110)) according to various embodiments of the present disclosure may be devices of various forms. For example, the electronic device (110) may be a portable communication device, a computer device, a portable multimedia device, a wearable device, a home appliance device, or a device according to a combination of one or more of the above-described devices. The electronic device (110) of the present disclosure is not limited to the above-described devices.

[0062] FIG. 2 is a block diagram of an electronic device according to one embodiment of the present disclosure.

[0063] An electronic device (200) can process information regarding an e-commerce service. In one embodiment, the electronic device (200) may include one or more processors (210), one or more memories (220), and a communication interface (230) as components. In one embodiment, at least one of the components of the electronic device (200) may be omitted, or another component may be added to the electronic device (200). In one embodiment, additionally or alternatively, some of the components may be implemented in an integrated manner or implemented as a single or multiple entities. In the present disclosure, one or more processors (210) may be referred to as a processor (210). The expression “processor (210)” may mean a set of one or more processors, unless the context clearly indicates otherwise. In the present disclosure, one or more memories (220) may be referred to as a memory (220). The expression "memory (220)" may mean a set of one or more memories, unless the context clearly indicates otherwise. In one embodiment, at least some of the components inside / outside the electronic device (200) may be connected to each other via a bus, a General Purpose Input / Output (GPIO), a Serial Peripheral Interface (SPI), or a Mobile Industry Processor Interface (MIPI), and may exchange information (data, signals, etc.).

[0064] The communication interface (communication interface, 230) can communicate with the user's terminal and an external device. The communication interface (230) can perform wireless or wired communication between the electronic device (200) and the terminal. For example, the communication interface (230) can perform wireless communication according to a method such as eMBB (enhanced Mobile Broadband), URLLC (Ultra Reliable Low-Latency Communications), MMTC (Massive Machine Type Communications), LTE (Long-Term Evolution), LTE-A (LTE Advance), NR (New Radio), UMTS (Universal Mobile Telecommunications System), GSM (Global System for Mobile communications), CDMA (Code Division Multiple Access), WCDMA (Wideband CDMA), WiBro (Wireless Broadband), WiFi (Wireless Fidelity), Bluetooth (Bluetooth), NFC (Near Field Communication), GPS (Global Positioning System), or GNSS (Global Navigation Satellite System). For example, the communication interface (230) may perform wired communication according to a method such as Universal Serial Bus (USB), High Definition Multimedia Interface (HDMI), Recommended Standard-232 (RS-232), or Plain Old Telephone Service (POTS). In one embodiment, the electronic device (200) may be implemented by being integrated with another device. In this case, the communication interface (230) may function as a connection circuit or interface connecting the electronic device (200) and the other device.

[0065] The processor (210) can control at least one component of the electronic device (200) connected to the processor (210) by running software (e.g., commands, programs, etc.). In addition, the processor (210) can perform various operations related to the present disclosure, such as calculations, processing, data generation, and processing. In addition, the processor (210) can load data from the memory (220) or store data in the memory (220). Furthermore, the processor (210) can transmit and receive various information with the user's terminal and external devices through the communication interface (230). In one embodiment, the processor (210) can control the communication interface (230) to transmit various information, such as information on various pages, to the user's terminal.

[0066] The memory (220) can store various information (data). The information stored in the memory (220) is information acquired, processed, or used by at least one component of the electronic device (200), and may include software (e.g., commands, programs, etc.). The memory (220) may include volatile and / or non-volatile memory. In the present disclosure, the commands or programs are software stored in the memory (220), and may include an operating system for controlling the resources of the electronic device (200), an application, and / or middleware for providing various functions to the application so that the application can utilize the resources of the electronic device (200). In one embodiment, the memory (220) may store commands that cause the processor (210) to perform operations when executed by the processor (210). The memory (220) may store at least a portion of information received from the terminal via the communication interface (230) and / or information transmitted to the terminal via the communication interface (230). The processor (210) can store at least a portion of information received from the terminal through the communication interface (230) and / or information transmitted to the terminal through the communication interface (230) in the memory (220).

[0067] The processor may receive an API request from a user terminal for a component included in a page provided by a mobile application. For example, the processor may receive an API request for a page including a first component and a second component. For convenience of explanation, the first component is assumed to be a required component and the second component is not. In response to receiving an API request, the processor may transmit the request to a server. That is, the processor may configure an endpoint (URL) for the API request, set a header including metadata such as authentication information and content type, and select an appropriate HTTP method to transmit the request to the server.

[0068] The processor may receive an API response from the server in response to an API request. The server, in response to receiving the API request from the electronic device, may transmit an API response containing necessary data to the electronic device. For example, the API response may include data necessary to construct a page comprising a first component and a second component. In this case, errors may occur in the API response due to data conversion, compression, and optimization that occur during the downstream process of transmitting the API response from the server to the user terminal. For example, the data type of the data included in the API response may change, or a specific value may be deleted. With such an API response containing errors, it may be difficult to generate and provide a normal page on the user terminal. An error in some data in the API response may prevent the entire page from being generated, and the user terminal may display an error screen (e.g., a white screen), for example.

[0069] The processor can determine whether the received API response is a normal response. A normal response may mean a response in which the data type of the data included in the API response is not error-free and there is no empty data (e.g., no data matching a specific key). Conversely, if there is an error in the data type of the data or empty data, the processor may determine the API response to be an abnormal response. For example, the processor may determine whether the received API response is a normal response by comparing it to a configuration file. For example, if the configuration file defines that the response to the first API call must include INT data, but the received API response does not include INT data, the processor may determine that the API response has an error. For example, if data that should be written as CHAR data in the configuration file is written as FLOAT data, the processor may determine that the API response has an error.

[0070] When the processor determines that the API response is a normal response, it can transmit the received API response to the user terminal. The user terminal can generate a page including the first component and the second component based on the received API response.

[0071] When the processor determines that an API response is not a normal response, it may return a default value corresponding to the API request to the client. For example, if an error occurs in the data for the first component or the second component, the processor may determine the API response to be an abnormal response. The processor may return a modified API response to the client that includes a default value for the portion of the API response where the error occurred. For example, if an error occurs in the first data related to the first component, the processor may return a modified API response to the user terminal in which the first data in the API response is changed to a default value. In response to receiving the modified API response, the user terminal may generate and provide a page that displays the remaining components normally except for at least one component containing an error in the data. This allows the user to still use the remaining functions of the mobile application even if some components cannot be displayed, thereby preventing a decrease in the immersive user experience.

[0072] According to one embodiment, if an error occurs in an API response that involves data related to a required component, the processor may generate log data regarding the error. The log data may include the API path, the reason for the error, a call stack (a data structure that tracks stack frames generated when a function is called), and user information (e.g., a PC ID, a user ID, etc.). If an error occurs in a required component, even if the API response is modified, the user will not be able to use the functions provided by the component. Consequently, the user may not be able to purchase the desired product or service, and this may act as a factor that hinders the user experience. To prevent such problems from recurring, log data may be generated when an error occurs in a required component, and the log data may be used to resolve the issue.

[0073] Figure 3 is a software block diagram of an electronic device according to one embodiment of the present disclosure. The client may include multiple code blocks and transmit API requests to the electronic device. The electronic device may receive the API request from the client and transmit it to a server. The server may transmit an API response to the API request to the electronic device.

[0074] According to one embodiment, an electronic device can perform validation to determine whether an API response contains an error. If the electronic device determines that the API response does not contain an error, the electronic device can transmit the API response to the client. Conversely, if the electronic device determines that the API response contains an error, the electronic device can modify the API response and transmit it to the user terminal. The modified API response may refer to an API response with default values ​​added to the portions of the originally received API response where an error occurred. The client can generate and provide a page based on the modified API response, and components corresponding to the default values ​​may not be included in the generated page.

[0075] In one embodiment, if the part of the API response that contains an error is data for a required component, the electronic device can generate log data for the error and transmit it to the server.

[0076] FIG. 4 illustrates an error occurrence screen (400) displayed on a user terminal according to one embodiment of the present disclosure.

[0077] If an API response received by a user terminal contains an error, a normal page may not be generated unless the error contained in the API response is corrected. For example, upon receiving an API response containing an error, the user terminal may display a white screen (400) instead of a normal page. In one embodiment, the user terminal may further display a phrase indicating that an error has occurred (e.g., "Application error: a client-side exception has occurred") (410) along with the error occurrence screen (400).

[0078] FIG. 5 illustrates a page provided by a user terminal when a normal API response is received according to one embodiment of the present disclosure.

[0079] The detail page (500) may include a first component (510), a second component (520), a third component (530), a fourth component (540), a fifth component (550), and a sixth component (560). The processor may transmit an API request to the server for generating the detail page (500) including the first to sixth components (510, 520, 530, 540, 550, 560). At this time, among the components included in the detail page (500), a component that a user must interact with to purchase a product may be, for example, the sixth component (560).

[0080] Upon receiving an API response, the processor may determine whether the received API response contains an error. If the API response does not contain an error, the processor may transmit the received API response to the user terminal without further processing. Based on the API response, the user terminal may generate a page including all of the first through sixth components (510, 520, 530, 540, 550, and 560) and provide the page to the user.

[0081] FIG. 6 illustrates a page provided by a user terminal when an abnormal API response is received according to one embodiment of the present disclosure.

[0082] When an abnormal API response is received, the processor can generate a modified API response that changes data containing an error in the API response to a default value and transmit the modified API response to the user terminal. For example, FIG. 6 illustrates a case where an error occurs in data for the fourth component (540). The processor can change the data for the fourth component to a default value and transmit the modified API response to the user terminal, and the user terminal can generate and provide a detailed page (600) that does not include the fourth component. Comparing FIGS. 5 and 6, unlike the detailed page (500) of FIG. 5 that includes the fourth component (540), the detailed page (600) of FIG. 6 does not display the fourth component. Since the detailed page (600) does not display the fourth component, the positions of the fifth component (650) and the sixth component (660) may move. Referring to FIG. 6, the positions of the fifth component (650) and the sixth component (660) may move upward by the amount of space where the fourth component is displayed.

[0083] For example, if the fourth component is a required component, the processor may generate log data regarding errors occurring in API responses. The processor may transmit the generated log data to the server and store it in a database on the server. Conversely, if the fourth component is not required, the processor may not generate separate log data.

[0084] FIG. 7 is a flowchart of a method for automatically modifying an API response according to one embodiment of the present disclosure.

[0085] The electronic device may, at operation 710, receive an API request for a component included in a page provided by a mobile application from a client and transmit the request to a server.

[0086] The electronic device may, at operation 720, receive an API response corresponding to the API request from the server.

[0087] The electronic device may determine, at operation 730, whether the API response is a normal response. If the data type of the data included in the API response is different from that predefined in the configuration file or if the API response contains empty data, the electronic device may determine the API response to be an abnormal response. Conversely, if the data types of all data included in the API response match those predefined in the configuration file and there is no empty data, the electronic device may determine the API response to be a normal response.

[0088] The electronic device may return the API response to the user terminal upon determining that the API response is a normal response.

[0089] In operation 740, the electronic device may return a default value corresponding to the API request to the client upon determining that the API response is not a normal response. The default value may be predefined by a configuration file, and the electronic device may generate a modified API response by modifying the portion corresponding to the data in the API response that has an error to the default value. The electronic device may transmit the modified API response to the user terminal, thereby preventing the error occurrence screen from being displayed on the user terminal.

[0090] Although the steps of the method or algorithm according to the present disclosure are described in a sequential order in the flowchart illustrated in FIG. 7, the steps may be performed in any order that can be arbitrarily combined according to the present disclosure, in addition to being performed sequentially. The description according to this flowchart does not exclude changes or modifications to the method or algorithm, and does not imply that any step is essential or desirable. In one embodiment, at least some of the steps may be performed in parallel, iteratively, or heuristically. In one embodiment, at least some of the steps may be omitted, or other steps may be added.

[0091] Various embodiments of the present disclosure may be implemented as software on a machine-readable storage medium. The software may be software for implementing various embodiments of the present disclosure. The software may be inferred from various embodiments of the present disclosure by programmers skilled in the art to which the present disclosure pertains. For example, the software may be a program including machine-readable instructions (e.g., code or code segments). The device may be a device capable of operating according to instructions called from a storage medium, such as a computer. In one embodiment, the device may be an electronic device (200) according to embodiments of the present disclosure. In one embodiment, the processor of the device may execute the called instructions, causing components of the device to perform functions corresponding to the instructions. In one embodiment, the processor may be a processor (210) according to embodiments of the present disclosure. The storage medium may refer to any type of recording medium that stores data and can be read by the device. The storage medium may include, for example, ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage, etc. In one embodiment, the storage medium may be memory (220). In one embodiment, the storage medium may be implemented in a distributed form, such as in a network-connected computer system. The software may be distributed and stored and executed in a computer system, etc. The storage medium may be a non-transitory storage medium. A non-transitory storage medium means a tangible medium regardless of whether data is stored semi-permanently or temporarily, and does not include a signal that is propagated transitorily.

[0092] While the technical concept of the present disclosure has been described through various embodiments, it should be understood that the technical concept of the present disclosure encompasses various substitutions, modifications, and variations that can be made within the scope of those skilled in the art to which the present disclosure pertains. Furthermore, it should be understood that such substitutions, modifications, and variations are encompassed within the scope of the appended claims.

Claims

1. In a method performed by an electronic device, A step of receiving an API request for a component included in a page provided by a mobile application from a client and transmitting it to a server; A step of receiving an API response corresponding to the API request from the server; A step of determining whether the above API response is a normal response; and A method comprising the step of returning a default value corresponding to the API request to the client upon determining that the API response is not a normal response.

2. In paragraph 1, The step of returning a default value corresponding to the above API request to the client is: A method comprising the step of instructing the mobile application of the client to provide a page that does not include the component.

3. In paragraph 1, A method further comprising the step of returning the API response to the client upon determining that the API response is a normal response.

4. In paragraph 1, a step of determining whether the above component is a predefined required component; and A method further comprising the step of transmitting log data for the API response to the server, upon determining the component as the essential component.

5. In paragraph 4, A method wherein the above log data includes at least one of an API path, an error occurrence reason, a call stack, and user information.

6. In paragraph 5, A method wherein the above required component includes a component among one or more components provided by the mobile application that a user must interact with in order to purchase a product.

7. In paragraph 6, A method wherein the above required components include at least one of a menu list, a purchase button, a payment button, and a delivery address input button.

8. In electronic devices, one or more processors; and comprising one or more memories storing instructions executed by the one or more processors; An electronic device, wherein when the instructions are executed by the one or more processors, the one or more processors are configured to execute the method according to any one of claims 1 to 7.

9. In a non-transitory computer-readable recording medium recording instructions that cause one or more processors to perform an operation when executed by one or more processors, A non-transitory computer-readable recording medium, wherein the instructions are configured to cause the one or more processors to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Apparatus and method for diagnosing phase current sensor failure of a 3-phase inverter

    KR1020230173968A

  • Interface Profiles for Customizing Application Programming Interface Behavior

    US20130104151A1

  • Selective validation of a portion of a server response to a client request

    US20230224353A1

  • Minimizing data exposure in API responses

    US20240004973A1

  • Error detection and remediation for application programming interfaces

    US20240256364A1