This is the overridden Stream.fromSSEResponse
static method for the bedrock SDK
When an error event happens it throws APIError.generate
with the first parameter (the status code) being undefined
Which ends up creating an error class here
This is the overridden Stream.fromSSEResponse
static method for the bedrock SDK
When an error event happens it throws APIError.generate
with the first parameter (the status code) being undefined
Which ends up creating an error class here
This is the overridden Stream.fromSSEResponse
static method for the bedrock SDK
When an error event happens it throws APIError.generate
with the first parameter (the status code) being undefined
Which ends up creating an error class here
/* eslint-disable prefer-promise-reject-errors */ | |
/* eslint-disable compat/compat */ | |
import $ from 'jquery'; | |
import lumin from '../constants/lumin'; | |
const contentType = { 'Content-Type': 'application/json' }; | |
export const ajaxRequest = function ( | |
endpoint = '', | |
method = 'get', |
const promise = new Promise2((resolve, reject) => { | |
setTimeout(() => { | |
resolve('hello') | |
}, 500) | |
}) | |
promise.then((value) => { | |
console.log(value) | |
}) |
import React, { useEffect, useState } from "react"; | |
import { Flex, Title, Button } from "../../design/components"; | |
import { Link } from "react-router-dom"; | |
export default function Michael(props) { | |
const [greeting, setGreeting] = useState("initialValue"); | |
useEffect(() => { | |
alert("greeting changed"); | |
}, [greeting]); |
import icons from "./icons"; | |
const breakpoints = ["480px", "900px", "1025px", "1280px"]; | |
// TODO should this be `small` medium and large | |
breakpoints.sm = breakpoints[0]; | |
breakpoints.med = breakpoints[1]; | |
breakpoints.lg = breakpoints[2]; | |
const colors = { |
import icons from "./icons"; | |
const breakpoints = ["480px", "900px", "1025px", "1280px"]; | |
// TODO should this be `small` medium and large | |
breakpoints.sm = breakpoints[0]; | |
breakpoints.med = breakpoints[1]; | |
breakpoints.lg = breakpoints[2]; | |
const colors = { |